{"_id":"@akord/akord-js","_rev":"539-afb3862fa168243ff85e882cc4f8c768","name":"@akord/akord-js","description":"A set of core js functions to interact with Akord","dist-tags":{"alpha":"5.4.0-alpha.11","beta":"5.12.0-beta.7","latest":"5.13.0"},"versions":{"0.1.0":{"name":"@akord/akord-js","version":"0.1.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{},"license":"ISC","_id":"@akord/akord-js@0.1.0","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"474c92a89676a49107c09feb7804833c81656540","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.1.0.tgz","fileCount":58,"integrity":"sha512-/n5yHS6oHgXxr6NihgzhMJIijDO/PL8l+t521yUADpu3wblL+Oae4n861M2f3PtfFmNNcSOmg+JNNmVJQw48xw==","signatures":[{"sig":"MEQCIDQ3QDSiroAj6fW0C99RXnjye+FDD810FryRCSDCOH4kAiBjPWL2Zhwd8JhPAhM5jRvK11g7Zoi5JsXjskLtkKVOpg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":187738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuzn3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPcxAAgndtAmyakMBoLqSXXTwDaBeTT7LcIMAIGV+7px9/tIK3DEyi\r\nRHm/Q15CDSYYgW9GQaEPpV52DPaz6IrLNH5dva0g3c4RcZpAhPFGT+UBpRd0\r\njLhrys7y8XKmn6r2kCJspS2R8MT3WLbFG63CUtWmdibP/jzswd3sPOrTH/7A\r\ngY4oNVk5rWpAWENbh3GRp0XdlL760fkLGIU+SNJY4S+FjHTLDRuuX9HLNCm5\r\ncIErA7nWZX+4mo/7k95wSfqy/9QEIdw4FsIMRNSZv+vyuPTJN51R19enV46z\r\n6BkuqmPLoSNiL0Di76kHCt78KAdtqaxDwjcc1xPwjwNWvHBfioSFyKeM8n89\r\nIOLIv0AUunXiDIduyAIT55dv5d02LkG2otVDMd/x+t8Rj3ORANbMGKg0Wo5Y\r\naDdRtWg0q1M0DSMEpfRefJq3ps+E+tQVw19iZjgxA8n9NX/GnjjbXB0eAvvl\r\no/PLE/ttTqUXpVrBHOIFMiOiX43wfYehPWJcpxSd/wjlSfsf3VUDugedDwWY\r\ngWy7iEAPRL6IhhGLXFME30xhYI10eZSXdEVrCsYDneQMukcPf4scQHjSwAyp\r\niNs/qyV+H0uL0o8F3+sw7PHN5dyQhm6D6OcRRWH4tcRPaWnilyrEyUyFV7fX\r\nU/kxPt4nWIxwCKWjiZlIg1AEwVbln/yVkt8=\r\n=xHmz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"tsc -p ."},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-amplify":"^4.3.20","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"latest","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.1.0_1656437239327_0.023504575621864143","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@akord/akord-js","version":"0.1.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{},"license":"ISC","_id":"@akord/akord-js@0.1.1","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"c090596312f732e01cdf422f15c3e43a94a67c6a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.1.1.tgz","fileCount":58,"integrity":"sha512-o7+SGhZEGIzdGS3I79wXAkCfoVDIe/jsB15tR0NHbbRhsPY9Ovi3zglf0F5KtwUo2KTD3s3C2kUCz7cyM614Og==","signatures":[{"sig":"MEYCIQC4KttOkAUHT4fX8hcxeDYyyA0uKbmQ5VxHGSPigqHcjgIhAMC+ZIRQGXctIgew+imHl/8boykxRvcZ9Aqb55EM41ax","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":187738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivBOeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEGQ/9GjfuAB2YixXjmjx5yrefAD3CldJW09ZD5rDpghhLt09qQWyD\r\nNeo0+YIr3jAMi/PKNtGqBUfZNT0TVv96swD7Z+GCCHctewZ2wBxZLQZMHC5+\r\n+mxkCholoBjD3yLxNgDx4FgFRKIsA1ucc1Da14lwEKC/n3sFoei2t40o+D4H\r\nfPlvLpdFgq27xcEz6KJWWAOs2NgwYtM0HP40a3L9NF0+Bb7WzTIYX22F/I4M\r\n28dpop20ZJDOO6e3wPMBkIVNoyyqLQQY+Wh8b/FmzqL5HWCLdb22rAYlf0uS\r\nZjTe21IO3uCKz38P6lm96iwIumN7cvdJwZjNZVIJQQ0sOqsMxEDf1i12nyhy\r\naO46dI/Co/Mym3APNC0ljTC9IdhKngZ7kKDAAAdMdyhqvH92sKK1WbaRSfi6\r\nBcUZYmEjgBmyAr7KWUwaFfE6G0yZtWAdiOtFL9mSWSwTUSyebVVq0q5imEh6\r\nsUWoCuXyVjuAhhNsJGIqxOnAOi7uMm2njrsnbqnhNCTWsyxAzSLI/95o85kN\r\np5Hn5NSHJ7lnrFnJWU8S2d5jpkjw/MJiIGgWRhTBvNva64UKbYg5Atk13jy5\r\n3/5zPj4MtaQaflh90mmEnirrMmrmsPJ6kRP2evjrBfgN4tSiiaw9k1Hi7NLt\r\ntYRVSmzcSVghfSEwOlVa4s5FoJcuwGOS1vk=\r\n=3suT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"tsc -p ."},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-amplify":"^4.3.20","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"latest","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.1.1_1656492958715_0.06904829639697008","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"@akord/akord-js","version":"0.1.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{},"license":"ISC","_id":"@akord/akord-js@0.1.2","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"185d5d6f3814ee8de5764a9c7958252db3add47c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.1.2.tgz","fileCount":59,"integrity":"sha512-IDPMnQaeQbzufAru78y71K9OHl6S9DxrPSEaBRtDkEhiA2vFh+hqfmT3rvuwSol8fTa77uJhb7egxZabkKuIrw==","signatures":[{"sig":"MEUCIH0JQ2b8CbiOD+iFHrOpJ2TIMyiAjY0p1eBi5lrP8dPFAiEA3tEFilgX5CnEMTGhYZpXbMz4KNdqJaLOgv/V1dcaNiY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":196256,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivBdHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrYjQ//d2ibdogBxQs4zwbj2plKjr/G1R+fYqM9Oo8gZUQhsozGhFdP\r\nBVp8KD0pbAOAzSlubaagHjNq5Lnlhy1FE9CMQju3VHjaLlLbBLDPYy/thn6P\r\nRvhjpCYsWPcaqJCtuFqltPGHjAH5v3c2UdEuHYZNnDrwUQAWtgYhsdeBFXn2\r\nFd2HB93VmzKCrgVQAYaQYmsLDeEgPodU/Fuaf7XUnP7eOBvH0bEHDcTElcHc\r\n2rMS6KyMhF7W714Y/fUBU+KaUfAZBD6BFGTdVz3bMEdPoRkrU/O5b62fGUCI\r\n9mWRlKBaJ9oZpZD1NzbQLTUDQocxrPX3HcBSOnJrrZUAvLgeGxq5/z/EWBs9\r\nl69G6u6FiBQrY942/VAZ9Zplbdowc5y25ZCDlM4I7DLGA5jSoBkc7ygFVOGo\r\n9nxkIK8kMBuxHmKWZazavOMeEMlOAzoT853SOmm0bRCkSg1rqFwZ0rzMfvi0\r\n5Xv8xsaRDiaQmrRs9IlEsisgnVCW/4DP/9h2wHWzCWX+0MGTxpj7SR37OUpX\r\nogeYHHiXwXnwz72L3iDapA2icwwQrUF9oObgguewpwLk2pulmz3VZ1LlJhjz\r\nAED0gcvToPcXIN4XokrqeTQTXVJzjykgVqS1/wCLrVxCP/Uldqx7e/wLuUf2\r\nrEwzdTAMenTb5YFXrP7MPhBtJ8D5WsnFBX0=\r\n=ScIA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"tsc -p ."},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-amplify":"^4.3.20","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"latest","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.1.2_1656493895129_0.5343156534094717","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"@akord/akord-js","version":"0.1.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{},"license":"ISC","_id":"@akord/akord-js@0.1.3","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"e202ea962d3670799bc1f8333498b01928296349","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.1.3.tgz","fileCount":59,"integrity":"sha512-oT4/fuG5L1US/azlSLOin6h2vfTVpcEvTZdxlGflNMT5F+5/1pbOu+nDFa5xvSoZhSgb9lh6Rey/FJpOyM+L7Q==","signatures":[{"sig":"MEYCIQC10ScDRakeqqeKCrxZgc6PYFFz8d/JDNBEQpfHr9Q73gIhAMyCTRzm4DDqGFNT8jtiAo3q5x6qdHYrtIrSNkO2WDkO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":197648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivDXUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrqeA//QfvQmDYe+r6HcyNtdggoyK+tRxCnLHLgE8+ASM6jUd0j7w9a\r\nHM7dfGLvEXRF4QHkJ9M+RS2E8TimFOzhMhRTBwDOLquA/zcQeWKIzsTzsihP\r\ndj+4o6uj8MUMBU1OanmtqlXmDON4Pw1k6uhAehBoYkwbtaxY02kQz6WYNK4c\r\nAPa8h60GJ5GlWfgsWF3X/dIY1A9CSg5y9Qpq43yXC33j8JTSQvR2UY//fmUw\r\nKfsJoTtom1PDxcIZIBOW5F0zosGwzdl01Gb/tQ/6nQstHP4tHoJv/mqZuzz/\r\nIVJHwnsAJaWeWj4tjphRCq80BPLIqmL1PsktjgOAJrFAPVkyUfGaG4kBSV/V\r\nMQJXDS1IC1y8y6D8abrynxlcCsLmvmW633ikRdRWbaAtc6pRkr1MOcpzKgvv\r\nq36LZJFTCYflI04Tcx9Ggs++8tzB7jKlyOR8+ggd/HBH3+8r2cVYdRUFaPkG\r\nptok7lUlVORPAPSitQgMOnusrRpJa57FBNogJBnIKrWyjdF7w5gv3XmcZc8b\r\nlFGqQ1i36dp/6GObr8xPEJwB6ALDwn5n8KjQ5wV85bCnXaZrYTIKnVm1YVb7\r\nVfkl+s0LGweC+8XK7J7/q34jZ6bWx6P5JtoDCDPEe52JCP7CSTNY3ALJOzf1\r\n8tpAhMgLn0WTFR6g/lj5hPTcLFiE6n7QwIM=\r\n=oAUm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"tsc -p ."},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-amplify":"^4.3.20","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"latest","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.1.3_1656501716131_0.23515048805685534","host":"s3://npm-registry-packages"}},"0.1.4":{"name":"@akord/akord-js","version":"0.1.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.1.4","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"81ea73ecd4bcb879c219c42941772de7e5fd5a45","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.1.4.tgz","fileCount":59,"integrity":"sha512-MhvHxJKgiwCFNaEtb4Vl1xUpR1jTf9eV2LyqLHRLMuPLGNRRj346tIewOIVG7wYU3+wJxQYnYKTypivMH08bLw==","signatures":[{"sig":"MEUCIEtwyzcuKuI89isTy9Fv4b/HSo9xSINjRO53p6/dw3MSAiEAkXCp/o43cbICwvo66SmP3GcnWAGJDvGBxQ86JIBe/6s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":197807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivGp2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmownw/9FjalGSgCbjTGAF1gFMMc79jbIca43txFA2ZvhNAMk+wh0xm2\r\nWwQlfGOiSwtjFxYJ+YoX/IJFHjV0ZJrNSEZZJsh0q9p+Ek5wCpPZnPazNlkP\r\nLGgEtOo+U27Ht+Yx9GpOWJvL99FxH9i39VkumemryAQETq0D7A9pUQ3votdn\r\nIE3LBGdjRPpy/8G1KGWyxDH8rSWnk6OAZseJrkF+eUSF/tITccLCidsFXOTP\r\n4C19NnWpZENpnyoO1N5A+MhuWQ7+cTnjoI2yEi1mWeSJGGrQyw0Wipb2SCL9\r\nzvn+peOUbjrtW/piRwyDag2FCKRi0UDX8/znM4TwO+BXivXvzKSpzMxGzm/b\r\nttL5cmfQhPCbdVktGLCK/qAVUTz3T/OCMe5+L9LBNgJ7VCRRHtxD5DdkX0DW\r\nqvOcQVMMqkkjHNW+2qO4LdVn5r7qw3kjC5Ia+wKwom7oTlRobtpAsJSLdSzD\r\nQpHuvhE013jZth3DQ2XywKDfYBVMAN1Wn7fW6tvW6dD1O26AeJL2LmuMmDcb\r\nq9792LRAT3XUSzfmbvzuMWOGEA82024ei/mj/j4wlVe7Pv1BdRbAOv9lywdu\r\nhE27LSDrk+cVvo4CO2edReSBlgzIkTZ8lulfEDHmnt/Cd9HF0aa2HjMdPthr\r\nMMn0+gRXjUFtFzGN3FCz02/dHP74wvTc+h8=\r\n=4kWk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"tsc -p ."},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-amplify":"^4.3.20","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"latest","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.1.4_1656515190574_0.9650989318366319","host":"s3://npm-registry-packages"}},"0.1.5":{"name":"@akord/akord-js","version":"0.1.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.1.5","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"b1aafb9ab828c62a0cbb1d47d3b310643bb9932d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.1.5.tgz","fileCount":59,"integrity":"sha512-wW4S5WsEXcfD/qVD4+8ceQEyrOzOEBHzjmd9qDWah7yEQjoFDZqLsJJKp8e3MJzCcTlgEsaMB71ap/SJzA52zw==","signatures":[{"sig":"MEQCIHF2ViHM6TdRbctWLgBSAerIc4QnkQdc6PpgV2B73NQ0AiAi/iGrIDsvnFl3VtXtUGhMatq1y/HGfS5+T7uKvciS6A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":197808,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivIulACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmodhQ//Wqe0em1qjY/6E+kNWGt3L/s5UNU6Y2TM8VHQFx3oNGAzeW9U\r\nw+gd75hMdvPuh39sKNT/f0nC1xbRB5uJp27FSw2J/0yXTA3FMfGvjBZOZ+Sg\r\nqn7YvOGNGW+jl2Xmp0n8H3z0DaoKz5bpBJ3tGN178JD35b2K/f7vdMXblvWm\r\nnpK74k2pmEl88NiPy4CpWGa4uxMqVGpkjAQfGI7utdSo0aGXGJcdyIufUeNl\r\npeb+3dZEvJpfl7mS+qUSsladlnPnwUIDqKM7gnn0dhk7qzry/RXCjMmWCheL\r\naVV9X1BbHVxWwzFbOXOWOrv/YZsdj1H008DPWGnUEow/MIxx7ppejVC79DDz\r\nqyXbRERwZp1YVymLM7QBeB4aMMnq3+8k+Wry79I407UwE9L6zMM0ad/7oaDc\r\nVpoNq0bL4nuWraFy9gCe7yAp9GAootPxYs0iv6UQbbqU1wHSUWYN8z1Gajrb\r\nd5t7f7op86d/iOwPppaugl7jfU9vmaPQB4Xk9BZDZIvFTYFikVetewQm3s/7\r\np2TKThvs5cbL+s5ImpyvInbemrF66Bcuut7ccpO/osCo0J3HtZneN6KWO0vr\r\npnRNkHgITqiofRMIKfkuPajgs2qrS17jvybh/HTQ/gAlVY1n/zB81w7ueHlI\r\nwibRTuFntIJzbh7n05UiM0/K73IljA7OLiA=\r\n=wubD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"tsc -p ."},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-amplify":"^4.3.20","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"latest","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.1.5_1656523685616_0.1667254979845021","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@akord/akord-js","version":"0.2.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.2.0","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"043bbf805896cebfd4168fc6af44088c7efa0d79","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.2.0.tgz","fileCount":59,"integrity":"sha512-QUrrndJXCbxal04MqUzgrjXod9NyE4Rt32mTk2lE3nXAyzLqOule6W7eos5tIYeso97r7RLakr4vJEycNQc1bg==","signatures":[{"sig":"MEQCIE/CkL75aDjcfxu+xxEFXJ5H0vr/J/yeT+ocR7X53vXyAiB1vABPm6kyrkL/qElXERnLYtYzswAnBTXJKa15k7MVeg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":203493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizUxEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpHTQ//Usr7Qr5myS7V7nj6R1c2Qifl0DJGhunk16hgc+qpn90U5MEl\r\nPCBFo2bsEqMH5erSPNwkMhdM6JolcqE8xoe35s4BZT/pB/KFnj3pcOoNRhTr\r\nftoNjwmOB0f9eNQE4WNYr/SRQ9crVpPNgI3tiYBTIwE3TN4ilU0fxFFa6VfY\r\nFjVT0rIqKJTFJb9AeLeOrXoEBoHh5FlUSy5QFU5w5d6sLaR7NUdfMqzkSqph\r\nZUYxbUx8OLYLLrFtfITH2kxxAdKIZBNd4skNmAhyLNTaHBgkP6rjC+oFbDps\r\nogvwEhDDP38ZtOobxFazjTTu3PM7umRH/Cn7eO+CRXBzbelonM9iUVxzQUgu\r\nx8vHQIlApF3rkEjQQxDOgyuaak4aN5TExXjhcNzOD8FpUuLxQG+Xo24D4OqA\r\nYgEoRZjS/fK8Vn+qnvj1Aw9dvqBd2YdfiR1r8Ll0BzENgt4OEHRdV/Nw0V3T\r\nlU+ungvRdbbBLQJcnGes9qgTj04b8xtKAFyC/sAisVdLQtTPR0VLAK9oByau\r\nDppLyNS/X93zUbE44OUWXx2O3cmduxUB4/6HRNetmTPXa2k7Kwp9Xf7BitS5\r\nnjMxFQTV+9fQuAXLQCfA0JnwnFI0cbc5jY/7tddk5j4jtCT8WKD8QGNBw4AW\r\nlREYmEJQlDxgMDkTyPS1P15duianlv9ifqA=\r\n=LIKK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"tsc -p ."},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.2.0_1657621572127_0.28115708063518374","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"@akord/akord-js","version":"0.2.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.2.1","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"98fb3dda3a20474031fa5c8bce7e5c30a3938ee9","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.2.1.tgz","fileCount":59,"integrity":"sha512-2v20YRxH9bFN4UCT6xLkJ8HIqq0u308PgJudvS/J0qC6/p62khOk2Fm6wRsQhbK3FXqgvrxRZxvsc1vndx0DiA==","signatures":[{"sig":"MEUCIGMNSnDn1aMuT7Xjmxr48yuQlUdJH6ZdpCLTxkOjQ6VCAiEAknVLLJoldgWautl3EoThsmUpwiqsh63jlOBkpIuOnEw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":203517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizVARACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmom6w//UNeGH7z9IEjBG2jp1goCqufW77qyjboKlk/jBwjNoBXExCfV\r\nepH5TJKBXRtDH4vo9xFUYnQIBFAH1eekofaUGW8+DpUMcLN0NmmnA5e0wSdv\r\n12tPm1mq1G32KTVsvkH0YFFCJkrPb5Ndi0iSKqnsLumdW7uqjSbl4Rrq86tK\r\nNKLsKvdqqlusCd6uxMbaJRzvMsTC+4ZOs5X3trhS/iJ6aSKVk16bRQgQ4um8\r\ndrkqNuvrymrH/wbzYcxhc62rxMyZdupgTwzduTrQKYupD745AuT0FYehMhYd\r\nvIppGv+8YvQNNAQEOsbD06W2Si1RfAYDS3D7APoW8lR2lezJrEmzcdzdAk0W\r\nnCZMYzaT8wytEW2FGoIODJNkg0HdMFjA0axavubN10qID9nIVckAFNNNqVIp\r\n0fza3KchO+sKPAJ5p4H7Erf74V2YPlQ+rAVDP2aKUBDhJ1POlEasICvXo0Ec\r\ndY6y7hLxg3y/HgEUOADxeupXNA3+mTNgjgHujlj4ylNcqcrJacyKnMsC+uSm\r\n/f28puBeCkaiShX3xNohg/4CDRTFxTMeRNSQ1ccrHauUkNqEnRX1qwf1zhrR\r\n1udAwhwNTZXP7J0o3XqNB3lEI2FDyQAPmG62Dfdt0DIPgrzYtQpEYo0TofIR\r\n4I/QmHRLCBlHQDsHIBGZA02eHWs201B5nF4=\r\n=Wl44\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"tsc -p ."},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.2.1_1657622545358_0.8230636580567796","host":"s3://npm-registry-packages"}},"0.2.2":{"name":"@akord/akord-js","version":"0.2.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.2.2","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"897af03e0e9bc8c8bf2a90099383592a55c72d0e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.2.2.tgz","fileCount":61,"integrity":"sha512-1owY8DbCQXoWUnfj6R1Alg27z34xnj+0ICTZ2n1miHKCeptkOIJuHdA3oVOg1oOkF0jP9YOVu3aUCo2R3YkWTA==","signatures":[{"sig":"MEUCIQCU5HcZmO8OObMGl5mkCPUleenLDGz4lIskXqb4/DOrVgIgRme9ZWM9fkK5thKp2mtL4yd5AXqNr4SGpVbK74SPuKE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218712,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizW6VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxLQ//Q7Ks6wUe6JM+8LDUYHwk9jPhXbVPrOZGjxjZnXiBSI5UOexv\r\nyztU7SZKmn+LPBEdDyXWYhZa5Xx6ThkXh303/3e6WwckMFjOXzY50LcFchct\r\nunDry5k5RSnvmrYJjbHXgZ4s1/Bm16M4nbjp6bZ2wnv08UDJyT36er4hnzUY\r\nkZuwcswQlJ1E8JGgYkM1E9YL+qx6V2G9JQJpFg36E6ZfLiPkyaQcHB7Y/fih\r\nN7d2Pm0URxA9MvHzS00o7TvgN+HL0CVwLCcvrpyRK2vMEmgdj1RlSrdq31o9\r\nDuPDWpwagVu9lJGUF7+u/gVZvpGaH2xagbYqrvOBOIIDZMUCftzBoTBD8I6N\r\nvkVZ9j6BraanNjOEM3DwKpj2IeZuUu8EyeIXJpvP0YFIJP2M9+Oolgg/xAzf\r\nZJ8T64/E+9MsmUT/qVb/WYR6lvRkwzGwY68xpdRa6fy+dqi8XkHMYp7oRBsZ\r\ny5SRlV8s4E2rBxOjaYhnA5bpNMH/VOiT0SpkN4aPK4Gefcczj+uOiDdeVQ8a\r\n8RhqiogTaub6cC7XBeHIDB4bC3UbYo1rLpeV9AGeINLcEo27URH8gtp6ZG8l\r\n+e+7hrhQQEJBZf51kuN5FgNL8SqZw3/tYC6bIzfjSBE/jX9Wfzk9VlIchwlJ\r\nitle1YLc3E+DjXmJO6y2bSkzC1T43DXCgv8=\r\n=EA8a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"tsc -p ."},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.2.2_1657630356813_0.03337995045409414","host":"s3://npm-registry-packages"}},"0.2.3":{"name":"@akord/akord-js","version":"0.2.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.2.3","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"be26c7622b2146bea2c45a9bb164e80cbccab9f4","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.2.3.tgz","fileCount":61,"integrity":"sha512-9ZtQhbKn25potUK1UoiywTXdWcTCN2NZH7LdTJQ9WHopCTLEmZVNdfWP38eSCbKrIQDozHDe62S5f5Q1wk7bNA==","signatures":[{"sig":"MEUCIDCXUoPF21vz5lrgfWaI8NOF6A+JwJoFFfis5Ak84CkmAiEAsMV06z2a2ghSUP09g6paj7yXbf9L8k27YtDxBA/eVUM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":219337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizbGLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRDBAAlTb3B8rYqc70zeSfGj8GIDVh6TGMEFVPwVZG7FXHKe1PEx1i\r\nLIyIDekKDDDm0KL1XAgQyHXKYzk5mfVxep5v1f3k3O/tap6Zf5CnsMIWFddw\r\n2vd3IGVtGupye85jOHHVMLVKeE2qJFvGwK8ZWNyEPFHgH6VB9gzMVhpSp/ar\r\nzW2Th2B0TL15/BeW7dDy/WctKTv98avFjKCK2Q5V1KSited9dS/QqoZCL4Cr\r\nsry6pF6ik5DNuos/tZA2FVf7/KI5/Em0D6xoTs83tV7NMXIR9INppLLj3Ioc\r\nuv0isNKSBsRkjOsIyDpLFNGDnMooKlfgQTRqe9XymJLLAeHNlpZpMIFAND7v\r\n9qDn3xNf0IZPc4ReRZYaf3KlmtJtOK1VUQnsrfytLzUduBKvJa98LGqDzPg5\r\ntW7UIGXtMlAPproXjYM54ELqD1yzqJfKygA7pTrep2eNpIOceR9C918rIzZ7\r\nOeneyvplsUTH6Hu2xdo+wyt/gn4xzwPaXOvruBuVSJAc2hraXzjRyJj8o8GM\r\nqx991Am4aMTyWV6Qhe/fWabznZFBz+g+8cEnjXrJ9vJGW5nuHu0ACgZStzJR\r\nJZ1aLbI3W7/rhtdlaQKlIXVeBrRt7w4l3MkZoskN+EJOxL5Ac11u2CRu5cyW\r\nnnMPDNL/4iokrPZeL1hHft07jkc1yFnuJjc=\r\n=CtUD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"tsc -p ."},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.2.3_1657647499116_0.9613396749653067","host":"s3://npm-registry-packages"}},"0.2.4":{"name":"@akord/akord-js","version":"0.2.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.2.4","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"145e52702d680f9446da7b07b25b6e6bf211757f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.2.4.tgz","fileCount":61,"integrity":"sha512-8LsXzGUDONjLsiBxnSd33mr0H/fIwrlPhUPLd3M2eM70VyCNS5iuuOT415APG7vinduIzK4L8LplBi0sgcJljg==","signatures":[{"sig":"MEQCIBnfdLP1YngWWdNIE0uKQQJUfdY0Ns6g7Hg5tSKkTcrPAiAU0blKywVg2Qk0qrkESSZJ55gNVMLxnqPmyoWONWGuBA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":222107,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizpUYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmofLA//S2M7ZuDfSCf1STYb1+B4elinhwAmlJ5ySQtmOcGtCXCGg+UZ\r\nko2yS26BBTuIWANMosL/dJBn9CW9VEbgnYi9wobR4uXcBHGRhzy2zZKVhxkM\r\neuCTSEvoZDTFH7sYN6NETD1RbkSYNHZEEi+LiLJKitbHXMin23xQTXZiVZj7\r\nTl/wRuMPjIZdtrtODfpOB/N8C6jXJaYW9Ff8cBsGXfv6Wku0rpVzFAJjvA5u\r\nfj5vtUejtR7cFU8X+7UxqZYXpJ+t8lpfRS5Q8biV19GzQ7FryYqpCuEiEcks\r\nbymzr51xr9KUp1Qdr/3EWHRgPGxmR3eJ4LpUpBY66oToPrZ6omQSMCcc76Xo\r\ntlzNf1Y5TWTcbwNbYtGGUSZCxAvmjLTS1EFDPVXmEwo1hflnoCosurRNKjZs\r\ntsh2HrJs8WAIgPwGuybezZ6pXHe+3wdnTAbn9lOYRdRtMUhMz80wmYadzrMc\r\nxmCdwgMGBIF3MzKmtNZoplve55HSimdWow19/DanlrRNFFwfvvhWEfz1L451\r\n69wb6wkVcXFdytfXUaS0icNO3vf4ffKe7n+zPl7J96X2JusRbsRCClXhlaP8\r\njvQGvSRC/jmylibGXEGiLibBl+ZPcNabb8teTKzX56eLTqnWCfsUtcECSKOY\r\nzFdTTiU819pZG+4zwOw96eIIVgO5Whrrdtw=\r\n=6snA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"tsc -p ."},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.2.4_1657705751788_0.6459670829418476","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"@akord/akord-js","version":"0.3.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.0","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"455dfce5484f2ea1576721d157e9656c8bba384b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.0.tgz","fileCount":61,"integrity":"sha512-1gaVdozV90OLC5hx4eZ73vTYPjY5RO0KGmGSNZYAn9bbV04wsKcn/tI+53YT/AUHbe/UACYOabN3bUV/14BiHQ==","signatures":[{"sig":"MEQCIB8dqHCEf3SiNU5XD/3c3fJN0bm4lb1N/w41XgIKL5nMAiAILsi0ucq2PENcO9wyl2Y68cOL9uVYWfrfD6lv61KWIw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiztu3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrirQ//R5hRJNoulYhgchSM+/RwurMuAgbjrbP8eC9FBK/KNL58RZCE\r\nffz7Gsd/xwL8hauVOGGSc9IxWC2xKAqdza0FRyBUvGINRvaKSDYl0uob649b\r\ntuAZKS3Faiizb46qdiMdGfeKSoC9eU9J+es/XmSVALwAtKMISupn+dL7Hsgr\r\nyegCOFDs1TISQ+i+uaKVmwMIose8kf8LK4MtMrSAloHe6rbC5M/qpOVDcv+T\r\n9fl/8f6LZTAVTs/sCV3+Uu/fItWoco0YQ9azl84KsbtbTzG5SOFNykIG17GO\r\nW6pf7ohN4VBcIrVISx/k7Tf0IxBQBeGn9OwwC6/5qRWNqdyuIcC1IvS4eTyS\r\nOakCff5TB7FVGBYI/xb8RP1GBGRkU2oTK2Gl1mDpKvfADUPrwBQDdKByd2Ht\r\nUSixbNsygM6HPnqw6PrvtPy481IZqOZGyatmEBuzL8aIXerz7jBW5gEm1yE1\r\niT/K3zAFemzOv24b6Dj26w+Y1qVTa9Grh1r0l9B/E+KS9Eu9yWLDOeN30+c6\r\n2JTSo8aweGVjuQproTTA645Ovgm/sa4fOv2e7i9sjygDy2vO7g+ehSO82m2r\r\nuVk/bkbzG0lxQpik32VZV6jY4zljimD05uQ22m1blkILoh+iIrGUwHIyQhr5\r\nW4WMNoYpzDMbOGHMENBkKFIasnxvr5f/Zfc=\r\n=b8YC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"tsc -p ."},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.0_1657723831657_0.5634016780423676","host":"s3://npm-registry-packages"}},"0.3.1":{"name":"@akord/akord-js","version":"0.3.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.1","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"0f5db21c8d27b6bb6569a196a917c600575f48e3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.1.tgz","fileCount":61,"integrity":"sha512-I/Oe3x3fsda2LONfQpNH7QdwUYNI3vbRnW98m3xZLUO0BoDew7Tc3FUGqEkMgWQsFTE8WUxRlKumCEuNHSydDA==","signatures":[{"sig":"MEUCIFSktP+21shLSB0hq8vU3KHI6exjO6OWhEI5ISpH1fFZAiEAhaq0OczJMBj2+1/ZYYJRWJVij5K63PouN41oiZvghH8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizvs7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr25w/9FkScz819qEZgNmPTpm4U/vfRWcBJc8beM+02B/a5ZS2rHcOH\r\nRm/RQb/Oq0EYBDrfOXOCWFP/79z9dls1medg6wsChbzMVvBINvcQkGXCo88K\r\nWmb4Uu4DbWZWvOsCgbke+Q3GWX1kB0iIRJyyXu32i11y12NeCPfWnpAmnjos\r\nimAjSUvzifu3H26hS8AemPUKaV0eK6BzkiJJfFxeyCLjsD6CVsY2SYlpLHsG\r\n6nALup+SIN5HF3HOImcAJZdXsOgTpIIcWIUeOEF1G+Ud9C5Y2dWExSTVImva\r\n7PXEG0w82fTXIqJOWehAK6ChEcgZXrAti2rP7cIMlp0kGAJJWUs47gVDMHwo\r\ncn1dx0uRKmstVnUsMck1KZByAOceW87h5OgUBquH0/ZKLpcZF2KjD01B5oeY\r\nN3vHnMJPdJd2q7W2Hnrc1Ndn0ybvTvHV1/V4ABM+3NP4xu1tJ5J0ZzEKNPEl\r\nfVVKQDc26nJKnwklkmQ/Ysbq6qOQaZ69TRCMXAmEsLXaP7+oruHvjMdRe1Do\r\nHiwRE9f6V0rBchk5h3aTTu9UrvDndkkb5IokF4t/TL6nXFriigAFwvfHQ8Kh\r\nj+qXmOauEcSRswtyiS9YN3EOgHRHUtH0HmhCfA09BFwk7vCQOlGM5KtDZDsD\r\n3lCZwNuvICFegqowJ+qe08ubAhY4pjCCMeY=\r\n=HQpv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.1_1657731898698_0.951406601352617","host":"s3://npm-registry-packages"}},"0.3.2":{"name":"@akord/akord-js","version":"0.3.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.2","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"793301a40101771e83f140d2c4cbf753b0187b96","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.2.tgz","fileCount":59,"integrity":"sha512-Tg2gN83HydFVi+NSWBWTE2PQ6WDvwe1JVp+ee84IcCUdoQBBwZt7w3Q0yEtsVwix3uBIpN2+Z/VRw3G7vdbDHQ==","signatures":[{"sig":"MEQCIGWNaEu7Q+72PF1vCklUAmDGAA2X+hUbRsy5JbS/hQoYAiB+CpSHhoSfm1qMFQ2b2qNrSUf4rBaNpeZe/Z376lErEQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":220224,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1UR4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0mA/+Iykv8FHA8nCdo6y+g2YtWg2J3xmIB7nekbMgp3rMWBY5zzFO\r\nu/ql4UJ7vzU553lLzq4JKMUG2CjvawdRVB5oqLRjKtt99ExuYUzrpuJ1XINk\r\n5oS2ymtj+w9nCS5ApVbAd3n/5QgSFg8/9j3z7RbVY99LNV8NUHJ91DyKAmWQ\r\nacIsZRcoOlKLd7RetRYhtXYr/92wMNqSgJIivDS/94Z096ypWiQSVxd/crpW\r\nChBmvGfR7yUvSXBuw5P6G0iemRIl9Xbim0xXfWqdabyHsWw0xPNKX7yJZYtp\r\nc41+ampY41UQTCfGvvwGPpkQ3ydt27wygp+xiQpSaCBy8fZzKpV5ykUWzNY2\r\nFPl/rfwvjKFuA6WD+f4CklnwKsyXlHzYxKWML10zm6BSx60ZGDZ9zcKmaZrM\r\nP12D+lxm4WI//338oq7zP/89Cw2QvxM662CXZiSto3K4t9/AV3w00OMfWRQJ\r\n9MoFKHFdlJnOdEXpRl4uMNAVhvg+ZeSaUY+1yhsS6oLPm83a0uS8wdYEsRL+\r\nevZ4OrJtn4jEyq5hzR3bLXxsO4/REynF19PVlso9Q8CEeaueFwe6FI998xqN\r\nQN7itTjkZbjzWFFic4GOmcxN03vyUvg+9HjX5Ey7yfREXyHqYAIgXvMz8iRn\r\npaE1WtvJ6AtQAeRn13Vxz8Xak6zM7sMRem8=\r\n=jm3h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.2_1658143864617_0.38461608032453154","host":"s3://npm-registry-packages"}},"0.3.3":{"name":"@akord/akord-js","version":"0.3.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.3","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"8693e6afccab74013c9c066c536258de056f367c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.3.tgz","fileCount":61,"integrity":"sha512-nn/7nMxea1npEnPy9pBuw50QJJEQHj6c1fW3xUgL19PT0gAWH002rHv2+XkMM6TztFp7sxhkOo8Mdg+TR5l+jA==","signatures":[{"sig":"MEYCIQDURyFZAYZUep/yQTg4DYS7Ro0+IzlIL8chsYlxZXOHXQIhALn6Gfqu2oALyNTKPf+4S1V3iFsfEuzE1fpJY8mu127x","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi4Um6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrclA//Zy2VRohM/iUMt88esOko7p0urs5hiYktWI9fZJ9Pxd6BAgvG\r\nH+EKhg2+zNqUApWtE/GsAh2GEr7SpZtdLb8R9AOhIndOTiWu2zNw7VYN3WSQ\r\nm1Xva2R9/nFiohWs/s211vPvkyCfsBu4cxxZjT0IpQR4SifhnjOeVsvRuqNo\r\ngnltiAdezHbHBWZelWXqYle/fNxug1A1K2XqDmERAGS7/PA4IN8+Ti0E0Z1D\r\nwYcdPDLlqMYQv6gQ6R5LNiTET84bFGedQFhjx9j+tdebS/ZEfmn3Uo0j8gAF\r\nXCStdxK+zQ77CtKBvvmsMQZbduiQHHN1Qsxt9xCahNrxgX1dFoPzo6dHB1/J\r\n86vE8GA/RSQN37uHKjIRI77KQ+HARTy/sYCm92xXSnb+QSZqx5DkJotBdYWH\r\nuyvazEMubfqdHgeVxK8su7x/NghltJiIziS1rpk1Ar0gH0l6PGD2ouDiq4Mm\r\ngVdtncxRHzqSdSMQYZRpKGk25dK9ubIRhrXTw0+lQsAfSMQ00DCIQY/W/TPS\r\n3WVLaHhs4LXmZT8kqTBRWvh/3ZhkQsKkFG+jFCd2WOkC5FoJhozCEFCDqqV3\r\nkQYzHFEPME/RmjvgGne/nmIPPmhaP8CMWC6TP05Qut84CrjhqPJWFmLlGRdg\r\n7IUVzGT3MeNgO/+qGf6/m0zcf1y6NJOtkAo=\r\n=qkAb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","image-thumbnail":"^1.0.15","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/image-thumbnail":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.3_1658931641845_0.20282742459570735","host":"s3://npm-registry-packages"}},"0.3.4":{"name":"@akord/akord-js","version":"0.3.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.4","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"2310b6bddf29b312da65d93ccd62e56d80fcc595","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.4.tgz","fileCount":61,"integrity":"sha512-TuG8E7ZRCyGkCDCKVBaZW6LR9sYAt3B5SVhYDGkcHP6oSc2inS2lU//ZJBNthQll3yBMTr2XuBJ9Ra8p2kWbDQ==","signatures":[{"sig":"MEUCIAh3/Mwod3yihS9vsmVZO0qixOUvDxrJ3IYHgaQQwCneAiEAqBnXYSUzMk2Fb8cJElKUg63JUw90pZ6JUqmuIu+hAxo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5053ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqykA/+PXHfYNXGKLK/zU6c9Jlz+rD0lgazw7kPGG5s/KxAsBPQ8b0V\r\nQel4zcSpD2oCvuwX8LptA/D4+9mMGdkE7Z+UExMzwT0hS86r5Qu4bv/gg0Sx\r\ngH++NInouE/HybYIsIl+JF/+zgW+qHM9vJ3pMJ0V5p9nSe4HTTYvtO9Vb06Z\r\nStPKFOO9/ImYs866nZZaoiGROmZVTggFQ/kR5hmRj9on+KIVNvWxnB5SBk75\r\nIS1IBveheCRV9pK6e94VAKZSjErL92XRqN18btmtsqTYd8My6UG6rnlQHXS2\r\nnYCYd2Ks3TIszQhU0+hx2GrK803lT4t+hNZHk37VKx3M+237Q+pUkAIYMNpW\r\n2b/49cOaqznfd5Ir6EhduVi9Ci0GL5o8GV3tMv5Z3sRyc5k0eTPs7M2Wndya\r\ns0JuYgNmDybvu4i1uuXxbEI/8UqhrGp+avTG2bJULkBFzqYS+Mi4tzJEgTKm\r\nuolRjgaVz3vLUhlTfTcUxMFrF8hYVYqj72dDw1/gw9+/AOT2Ee5fFa8SiRIT\r\ncYIAK6oEitvTGn42yELb1Alg37XI+gIdNb2eqzaleF+L0ORKgKrnj6Ak1Tzm\r\njb9HdM/yTX6QEeYEky7vgh5C+lXwOxftRB5aibEktiqCTyAEa8Eqa2v7joPo\r\nxrSvKw5ceKSE2kVBRc+S05NFdFfow17ghoI=\r\n=qK+k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.4_1659326071172_0.6529551834240697","host":"s3://npm-registry-packages"}},"0.3.5":{"name":"@akord/akord-js","version":"0.3.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.5","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"82b079e3f50630d23c9ee91665ae460f2b5a68eb","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.5.tgz","fileCount":61,"integrity":"sha512-9lP5uCqPMWQZgYGC/pebpTjBON4OUAyNQx6BavBxOYGlgL6NNTBO537T46UYXKX9FALfVeieG/6eS8v02lGp4w==","signatures":[{"sig":"MEUCIQDmIWv+imAM4CDkRZ5GIP9WS+ObA4Goco51fMvHeTujqQIgVO1aUe1vOhChhzf0uy2ySsqjpqCS/ORFn3kU4OSBg3E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi58e+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoKFQ/9HPczuWKEZsebSAciPYBZwO2Q5Y49tqk9hfEYmVA0ixYLECcM\r\nIim8llbumfEWH6DuyRFOj0PnpMZSVhKCD7H0pV5Rl6I4ei8/dKwUBUIXFvSk\r\nGjZFd3sIHtMXSzBAVFRPewHmsFZejIxfxZ71mdT4utLbqaH+SSsmNPCi4hLt\r\nF0ub1ffONtkizaZH4L8tbtiMckKblBDLdMz1DWAudP47jCOhJIriPLLufn2/\r\nRPNyKaz5/5WuyFoozNkkQRRvnTVVvD/SU5Kw5m3jrza22b6wqNsVzl6tvymU\r\n/O4xTNyXjtbToIOf0jD9D2gCdIvsHIiNgnou6ezFN4/ieFEZWRAS0sFhwWmL\r\nvMvHEJyBx+cXRMbqqdmGNYGVE0OhV6tqsg4GjxUWGgnlYnXbxpOfnN05Jfdd\r\nI9Xi3VF8Vv+VshP/ulWSl7bNezCwprmZ6SZbIE+rTTELMY1Vi+vWvObLq48t\r\nqGEHcBy78w+wxdcMQV1g26UZtMbt+MOkmIaw4ZOFXDXjFhM5pX7BDEwCuzeL\r\n9sFgRPBrTgZX1RnOtqN3CtAHU+6Dn2A+6iGvsXQ3J4mQ1IfHNTbsJboEMWXe\r\n7kaEZyXlNAFFp62W68RACmL7F5mVbemF0XXrj549D9yh5GPp5WnDTK+e+F5W\r\n1PZSmnGrE7X8xgzAxGll4zxeZDvUBGc2/hw=\r\n=6lnu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.5_1659357118662_0.6433909151602293","host":"s3://npm-registry-packages"}},"0.3.6":{"name":"@akord/akord-js","version":"0.3.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.6","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"91e1d9bcbdbf710419d8af1aaf2ae6affb5cc3c6","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.6.tgz","fileCount":61,"integrity":"sha512-G294qk9pMiLAOcvWrQe3BKm0VtfTuzeZb1xK7v9LeHMlf0m5N1GtBMbiNyd3qHZ6FNYypn6QrzVyfsXCdFYQuQ==","signatures":[{"sig":"MEQCIH5/NyAp3hAwsS4zppvKU2EtsJi52ILJTHewUhM6ICJLAiAjvr/bQvHzI3zR40mEE06zfthI3+CQtdIqEcVmPUI01g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi58/lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr12w//WYW5WYCoxpjiZs3MzE3vXWmbt3R5RQcvONUYkCyleRXkes9v\r\nJnClERcxKqhoxNTiRoyVPt+tTrzalBnLOnCLo5mM1ZIiexrhL5YLUJoJiFQi\r\nbJVXitHUgKaoPZuYrI+sgcIf2KO9hm1zACE7q05sS288cJwO7b8f9kSUrvJ9\r\nRFhQMZSUjpgtBEaCp2C0XTleIpbmFRLQsYGet8tsTe4Y4ncoMKgNArU+2sEz\r\nWEh3OPpQE2hKcaAmN2cGYq1iUDUjl+L3TNWgudxBZj4ZtYifCix1MbB7Nu/2\r\ntNywOnj2lUCOo0CQJkpydORwxpB5Um/IVVavlSqxt8lkoiO1HHyS58YDAvEP\r\nJYbva+lWSpM727Pb1HWeupv1PGWRdbaTBxVaOsZyksXMvPPMsKO3uDaSpBqt\r\ny00Iy0WZznYpW2LR+OQu21oIzI9a390w1SKxtYIhu/iiQrzHwMDO769GiNPx\r\nKi2jEcdewRHIUhpPoPFOIfIk/fiqvZrFAZ559zxsKwcM4vEuFrL6oGqqWvIA\r\nQ3Qy8jD2ZLdFReOnznJHXk3+a2J+WhQkUnh8R7zxcb6UNytejLgLzFwZjLol\r\nyma9j7rJ6dIdCsFJk0B8FyyQe7jlk4fRSfXf5Z2HiFNcLQYdoFlmbOSawpWg\r\nhf1kxgIZklOwG9OQGUayE1XPLbFeDqC9PgQ=\r\n=Irk7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.6_1659359205521_0.5921306341802002","host":"s3://npm-registry-packages"}},"0.3.7":{"name":"@akord/akord-js","version":"0.3.7","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.7","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"60ab9fecb545b6f57dda4e6e1b3a15aa21d1a814","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.7.tgz","fileCount":61,"integrity":"sha512-j/KhVpVYcCFyrPnMHvfuNyLPnsVnKEV2WmV72nXAKSsKkxUV4sb9Kn7c+dqAO7YUzrTFQrIYvPjoDRMX7Tu8SA==","signatures":[{"sig":"MEYCIQDDVLB8VQtTX+fOM00tPzBvj/rZAJl61asHIqWbGWxZVwIhAK4aoudIqVGZMJ2ECI1yTkcfzogCKJj3rpNG0TPy2TIq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6lXHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMqw//Uk4DOYse+7N7nXUfSO2PlOTW3NzA7dHcp0/9/4Agc6jOSBNI\r\ns8+oDhshxwpHUY2LT750lrj5VjAwTlOpdtMxdDipmYe2FHXFTfdWMdrWixDV\r\nKAbr52hJkmYndMsn4wjvIiCWgDieL46DZE/epTxohgyx++A0Etlwf338pK/X\r\nJVICN2J1o2SSMza00nIQJ36IyhnNie+ddCPMwyzw7dPzbBjhymfRbOl8p7Ez\r\nWYxnLBXDRrpeRus0UMMZID8fcqk4T/qxF5U7sBNbRWJ45U1aUS528r2PgXzP\r\n+nUTeAcXSjPG4wcrIOzAT4wswCXhkg6jbBcZdNOSeYM95t6QaYlLGhaON4YP\r\nJSGilbs7iCqfKY0VpZTJVCta3H2u9LFk9uGybMXtrdrmaX6jSp1o7baAteQG\r\nwS6Fcntx2JnaGMDEZLounqaZ5grdak5HxSpDrh+rIaU4FrC/tR3QMUos7YbW\r\nc59KwzqhuNnVYihr6VFqWhg65WJKJoJAoyub9krsGOwBPliXxswPsxAIwcKR\r\n2eNyUE0JWN9sF04DT7+Q4F/nIkrYhrufh2hEOktNlQvjxgm2SGReV2vFgjqv\r\n1mvFVcuqvg2BuW16dVVmVEp5s0OPWnqX3461CC9tjqyBGBzQ7sKRDrg1xkQg\r\nyA2m+XnWk/8Q41Sla2o8gul1kfQgAv0ZWZ4=\r\n=KABU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.15.349","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.7_1659524551480_0.98548747644909","host":"s3://npm-registry-packages"}},"0.3.8":{"name":"@akord/akord-js","version":"0.3.8","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.8","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"ec8cdbb5a58675d3d14c4eb1234c3343788dd1be","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.8.tgz","fileCount":61,"integrity":"sha512-MnDzEx8FHVu1btwZRi954jn0+9KZWerNok8mARdwJJDLAWUjWWkTRT5+jf+hro7Y0PMBcBBmswXUvaOmu8A30g==","signatures":[{"sig":"MEYCIQDLBwhRFf2ZJ2XO86g9vkEfg+0nASuMbjfz7xbqWb5CwQIhAJ50GWYNwi/BrP7/oG9NSD40fpCjCqvD76EKcJDEODEp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6oMkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp7MA/+NcscAJh0apnxtfijKpnk9TYlx8GwVMnlhkDmxvFyzCA14UX6\r\nGBpKDXlDZ3GfZ4vnc+NEugKlOw0lR8m1PywUFA3QG2qiH69NjrzSZHE9ie4k\r\nYWo9lIG2L7k4uy/LawoJKNo294cYx8onmcWQHc5hlcS/LVFosa53UV65wu78\r\nNH9kA8bMns1ZHJd/P3Ofug1k1qHgP/UgGPdptgpAoJueoTESugR/DFmrGCy5\r\npAv39ahOg7zK/4gtxWr0vpDvN5GgjcNlcMi5n1IjU/yI/TnkbolE/gE4RBFG\r\nx3aWIPaUFoyDZQOe9KpFw0RkmuPEsOHN/RTmgJbGR/Z+oni71xrX7XVkTt5a\r\nfsP6dgYHAyLit6a6CT+XqZK7g3ybnshnWAAaHy8NbJOAjZs8txIqN8w5auRe\r\nMCp1wTcF5QF85xCZe32OwIo1oLDdknvsSZQsSD3kLoQEvhVpYqIgfjPBDeif\r\nuFUAvZF+/rWW4EQ0SbVsxNHBcOEGHTrpayXL9tnyFGxEu0f5JJTTOVW2RFQW\r\n4yOmsFbl9wif2IgH03V4PohTc20x8ztNHj8SJYM+c/NkY4PzZo53aI7WkJfb\r\nStSpyWvQJFlyQa/FQDxarxldEW8cDEaqBcAGnymxQrYHViEBGR+4e8CHJWWB\r\n+F/4DdokAZhuXzscey8qIuwx6WzTZUqb4K4=\r\n=17qv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.15.349","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.8_1659536163835_0.7373794245454528","host":"s3://npm-registry-packages"}},"0.3.9":{"name":"@akord/akord-js","version":"0.3.9","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.9","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"b0dd9d8cfdef19f3a1a0d8bb2064a11ecb0fe4fc","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.9.tgz","fileCount":61,"integrity":"sha512-u8NDoLjI2tAdnaOSlb506m5eCrsueFB04jgt/+v/4BrYnIv7n3ICbsJ/yCBdT+N+sXCVoZieRi4eQAECVm88xw==","signatures":[{"sig":"MEYCIQD4Vq2+ao/t4oSTljZtJkAltqHj6qVGeaoViOJk8nrkRAIhAJ2FOzEhtmh4BODuMoO5XSKoyXQ79rIVGd836Y8aP7N1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6oWHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrF4Q//X5D8Qg5n7pi43Hy2uzwvq5kAdgg4pIRw7Ns1hgC9UCVhort4\r\nnUTdThB+k/hhtn1wtEQ6QV06664UgoHLFjImoi+QrAguWkeymswTcxQ55DOJ\r\nPmUBOCn++VWtx9+rP62vPa2vW/Qqj4Eg/YRuezaOqDf98BU69d+bqIkTglqe\r\n8QTzV9ejj57qDh98BqZv3fS2YoSceyvC7gcnoNWHq2dO+/U56W++kCop5Dx1\r\nTBu5hioc2FpWTIaf6zjajArCAU/FTIpX5MblnVMD6qmiWpTDfqJWzJTp9u8R\r\nibrC2P/hQVhDMc6h3Orc79W2Wi7lLRjh+yIp1PxOxT8Y4gdxcrKgSVf0CW7l\r\nkcokQpB0cC1LQc5yG55BdjUCixccD8DmaPa+n3Fktr5EdTIHe3hQzHXGN3MP\r\n+K6BS8Y/3DovQhQ6xRjB+ygagj6/l6lFvSNJblgbmh5CsGR56EnlseJ33Lja\r\nRriz7tvq+UVoRyKg0OQ6lAM7UJuiSrwCJMtDo9eZHWSHb9Q/fPbUXHYC1scD\r\nFLbZc8A5wS9eTItZiDOQrQKYht9WvQxFUDxOUGemjAEELa2wvtDCJ4mYp+92\r\nn7c7ykiVK+cltiPRkmSP5rS9AQoqe9kUOeHiakI6zZDezdE5EWzlP/gHYS1G\r\nLLuwPXVlNy+k6YLDSX5hi2LRjGZ8bMzAZ+s=\r\n=HBA7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.12.313","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.9_1659536775335_0.21232807227514994","host":"s3://npm-registry-packages"}},"0.3.10":{"name":"@akord/akord-js","version":"0.3.10","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.10","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"7fdc45404dd0c1e891d24aaed1b3c1f2e1a887c2","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.10.tgz","fileCount":61,"integrity":"sha512-vl8B5mZRmtTVudFGDWdebSYFeOj7hqRjDIsy03MRDDp386dbZ1UH2lRhzMAfqSp+7Sm8xkU59+XKg5QzZDP1bg==","signatures":[{"sig":"MEUCIAIG7ISyRdwaaQvwVHHOk5ghOQ/n3f1PzgiUHgdAgXj/AiEAtd/ui35s8Lgr/mrc3KYvAFyrNNta1hxiq3b/r75B8dI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6oZsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo6Ug/+L+mpiKVvroTCFmhYEh1aEnwfguvhFPFx66j8kGTV7674xJYO\r\ncTa/9URn63skQOMIScaCdo+lKifqnQf+THKoxSOpV96CewrQLf8IYiqvM8aB\r\nU9uaoR9s6O57D3UXqJDagR0S9F9yGj20YTMINrfRmraq5amXwyXHN0FwvqRL\r\nh2EdS14c6pPlZOQaJ+8DPzr1ZDPpRu4nIA883d6YhmPQ0q1pEr2XivrVpOxh\r\nLwdr5NlTkP4h2uehwph/XDDaRaQkiAIoFhTAaqa4EVEPGkwXEb6yVsDc9j4Y\r\nVWRZpnPRjegiULv5zykyfmBuHGkBKl7qtyN8nK4F1crk6tTeeUn38NrQC5Qr\r\nv6M9l8J1AN2FiZ5SPBjgZvfYixkcXfoXm6C0pc/4aSST9h0W/bu5BE2Zqpn4\r\nem+Qufm0ELJkmVjM7pl+XmyFyT6mAt5M8FLOTdA+afJobdEId+/ImK2/CFNe\r\ngE3y/KroYVcCRaTV97J5ddstqQ9PNKv7kwG4nGkwWWOvnCicr6IQzzq5gx93\r\n1lhJSwNapUOtXfaTwbaAtLlnRwFhaMP+BrpolYjgLqeKBb2cxfLcEBAtKmwk\r\nmV6/Fa9IU9/iMah2LCrlQJocwhMdKYopaTndq7fx4aRya90/cEqV1VMrh4/W\r\nZNPP84gNtfMplnANmcz1C7nrRRa74GY5/SU=\r\n=0i7B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"2.12.313","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.10_1659537004085_0.028602374712031198","host":"s3://npm-registry-packages"}},"0.3.11":{"name":"@akord/akord-js","version":"0.3.11","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.11","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"11d1ae8902674f283588e25341270d07ac160cbc","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.11.tgz","fileCount":61,"integrity":"sha512-AC4CZvFPw5Lq+3noK88M4Za6f2rQLlg/RV3RInLhA+9lD1gAOmYM585eQl+mDfJRs9S0kjOVr+SsTQXBljB22Q==","signatures":[{"sig":"MEYCIQDSttl0wjTWISGFCF481ZW7/q1AYrk842Dx5yckX6Vl3AIhAL3Trubl7bGKGBczxC6p/d+jyQFK9AYMr86hbM4yfZBS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6ofOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7RQ/+PY9lgb08U0dtJMJrjB85pQK6LyANbZzfOcQSaBeQ7oyUCQXo\r\nNbRAvIjXILF31kmfLaQyelkh2syhb3bSYwuoxdDaOxei+UsBbnW0o2ftEmY0\r\nv5ebV4Y8y9ADa7xG+vxL8HLW7seB+d8/MgSPJ29Pwzg2GzRkybbFlg8Ei7hd\r\nUOriiCgmdXmg3Z053DR1IYP640+us5O/cPojnmxjuB+a/4TOH9EqaO/RDpDX\r\njF9miU75R6yK+glf08+VNwGdmPCiY9C3ubcF2q1EsO9cfdLIOQe3JXZQi6+G\r\nBlPUHNkTZfivP7/C1efzlt9Ba4jQWThvMWF7ZDN4Xd71zLPok1N3MbTVSN5f\r\ngYc+blvlF1EPluHJT6uqMwmrhN+6qv9qE7TNL2XqCmiSyU/sftB8ps9UeMuD\r\nVRUXa0cijofv3B4nEPWfr0lAGJg3gaJ1L3wZaBtEWPQFBxrXSpRONtdlgQo0\r\n9pK5xJ59QQWIMpsefF/vXPdvT4HdRAY7mizoNlntWHusJw85SXR/zjCO8XY8\r\ncqMa2tPbBMoQGgM4u2u4jKqsrbMoZ1SOE3bv6hUSqXdmjVEr8diD+Uj5q9YM\r\n8SDy8hbWXriuHjJSwy/xTjZvXaEanjtLX6VPfP7WppQwyap9O/4e5uxt46I0\r\nznqkY6XClz9y53SfeMXDrlqw6e8pJOaey9k=\r\n=WDMd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"2.6.347","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.11_1659537358162_0.5160886409105034","host":"s3://npm-registry-packages"}},"0.3.12":{"name":"@akord/akord-js","version":"0.3.12","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.12","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"a87e433c20b47e6d8680a7c6ffd130a9efdd9bc4","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.12.tgz","fileCount":61,"integrity":"sha512-fuktfjfUj8PIXxxJDKBLKZz6MWgadlOVrvs6L1liZoEmfFsibioPfgFGNX0bRdEJfrsmnh4R7QH8Apdik5yLig==","signatures":[{"sig":"MEYCIQDyqVRsy/14ywaeC4F2rnQW5IHS/aspgj9C8ZhESyHqagIhAOvSXfAh2xlBvg83TTO7j8PSQOuZUSoRHgyTIqV/a3Nf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240503,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7lMPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDPA//SMTQnfUV6bo4+boFrFgeYZSeF/teLOeBTFJ/ar0flVZJsd4d\r\nSAbXrwNqcFkF/R7GkroGSelGrzVlMo/AyocyRbvgrwZiwcWZcz27RU1haSHV\r\nGYGGMfYJT/lzdUdR+8iTErvl0UQL4zrp0yvvg284TJDn2NPVUnngQyfIMOZT\r\nSP2ayjHyyaQrKuG0laLtd4dIKPt7M2C5Qf5jDhvgmZGQnJlBUodQaz3eZMUb\r\nQevoj7q8F+TWlDBy+r9i8EzzapMkOdLaYcYZU3zPnLUifSZGs3uPnd7jYVoT\r\nr0ylkCZjv2xkNIfkt0Co9yzkfYXGTGuVB8HaNe7IYWymOOVpuWLc3zA8XE6e\r\nzuN+2i/ekm8abBEpU7+vQyQzo1KZYY7TNWNPLu6C8p20JkXzIsQoRxXIqzUo\r\nGGzRrtS8UsWGbfWM3I211IXAEktXLzO+bROCM3bpADl6cAvTWwQspzEe+sYa\r\n4GpIxCaW0NdiV7PF23mZJKbucIlSr5R9lFDpz+veTTTHChuAhmj2Jm0+q62B\r\n2A0eMPqI80QouDWc/1tW8q+WPBciec8Y+cXqzQsxFaiNMAkS4b8jbz/IO3D9\r\npBIjBpFSU9KN2PgzKV2ZChPQn2dPqhEFMR6y6lW1E+RHawU6fdD4NXu1llX6\r\nZD62MpGgX1KnUL61YrV4mLh5K2/ypE/hnvw=\r\n=VTrz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"2.6.347","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.12_1659785998784_0.06668527020843129","host":"s3://npm-registry-packages"}},"0.3.13":{"name":"@akord/akord-js","version":"0.3.13","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.13","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"eb2474ab340f9302b8a3ee14d71a585e60b72120","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.13.tgz","fileCount":61,"integrity":"sha512-HuD+sogcd7L59xCCYbX5QBFvFSncagQZ3ozHyqSoYP5+pe86Gm3JutcFA6hu4U9i2QYcwtRUHtacL7vM2Ydywg==","signatures":[{"sig":"MEUCIQDFZtPwMw2E0KKI700CsVBXJpVu6+sfZ3yB121AjBpvLgIgEdG/A9OY/Q16kk2JWqkkDlOyCCsg2M5N9Vdf0lx0bPY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7l3PACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvNQ//TqjT2XPCizSkPOmLlapAi7AfsGJUDTu7PGbRPTtcg/sggR2L\r\nGk5u1BpQDwSwlJXomn0xGou0CgmrCmoPfPjtWEni1xi7YLGzyiMK+2kHUihC\r\n7CcYLwI4lkKJZ3m66RXT8VjrBGmwvjq6Imub1Y5Z5i+eSCQaF92OF8TgtO4j\r\nioQpFMxoJIa/5YiLUIJ2aLAhtunL7GmE3OHLBx4+mVwyRpIRZmXcilpsFMWn\r\nuIcDjQrAxDg3osC77dG1n5icBTKXe146QdWjbbefswtXSSxV2ZPpFfof/Off\r\nfmT4kU3T/BVTrTP+TSB/TzSsVB6vgOhZRqhiPtsbUpYuxTGonyi9khwSS92M\r\nnH7oQjnVML38k7/wl82UdF/9b1WjbAipSE9IgI72Mqbk0+7Rzsy17jE+HQQ6\r\n98Shz+G5exSuOtgrYN1Swym++LWZblZd2LclLtJk+gOiGp+axBzWcmAdh/dk\r\nAYjyRi3jHSJyF0xnj6gdMt+wH4Omb/t3uv/ChUsAkGjF90a0B18kR4oeIrhn\r\nvmgOlmoiFL3vu7tD29jCgR4ZuTysBEqGSl4sjnD1YQLXfRunMpUuHq/d2ldT\r\n1c740O6t+dGVZj2M4vcSqCSQrDgfB/Wx+To/iGEngx6ZSA72XP0XyrscUmAx\r\nHGMYpCWnjbRajwfTZcoXzs7MnZyNfq8oHBE=\r\n=kvU9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"2.6.347","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.13_1659788751514_0.4625799959839434","host":"s3://npm-registry-packages"}},"0.3.14":{"name":"@akord/akord-js","version":"0.3.14","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.14","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"56fb384cf25c5ddb6b0216e49e46072c02846640","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.14.tgz","fileCount":61,"integrity":"sha512-EyfglABr9NDzg4ovgkcuaJGyPsdCuHNKASi8U0KLhUqDaiOLd11MUy8RAeIHloRce3KYNMiDYleNz3lVXV3ekQ==","signatures":[{"sig":"MEUCIGKDffNXY3I/dp737T8DGYAMJ79gDP47S9NOzMNakkW8AiEAlXACnJV8/Cj3ZWUQPDJj4wHDPcY4z2wv+Ga1/Z5Tovs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7pvUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmooSg//QcwjzjZbxC4UOzwgbrsJi8cdnXdm32URf3tE9JUs6zTxjWQn\r\nDlBtsc3UUmKz2MQpQnhWWBjI+CanYuFh3dUPYdiuy6hu46LlC+/e8xG2sqH0\r\nYqUFkHwZDc0MOSC+hfL1TTveS3lmOcWsNQ1TlevZDnbfzAzfBQuQJ7XdE+j6\r\nyjyM2sPf8j/ggkthOuPgNdsgRq2diHd6Qi5r7mjcIBoOqgm33qXjxy1oZ4gW\r\n6+W+tB2Euv6QgMP6o5OMPXHBktLqYy6nJYvy87ttNrFF8NGf9nSgM7doEuWS\r\nXX1RP5uQI6/rCxI1xSQW3AZ9ewAIUZtn8EfsjxT60ljrpQXljAj7lpBFCEuc\r\ndI+Jkq2VCM9T8cGFb6aqscy7DsvdIXackkgqwJ3o2VeKlm0PRAIsyjtYQHzn\r\niSxpUzr5kwcPTt+KEiIV34BtWLspaLVLu6WTz9C/XDk5bFxbfIkvgFfLGBP8\r\nAb70oJ1AhvyLNiFEGAH/Zp0POOAHtIateatURqXT7MxXdzeac3ali5B0ROBN\r\nOQOVrkDFoPhgsK7i2OUgMZtp8Cq0ocd47RetOi5O+YgB6yQNyxZ1yworPvat\r\nQO33Ko750+CTya2M49aUMRCzxNz7k5HPbet6CugwqCk9KIo3iZjAhvpmFXP4\r\nEh4cGafXU7oiYmDvNJiN4VQSuxjAByrYyfg=\r\n=ksCu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"2.6.347","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.14_1659804627947_0.471562745584013","host":"s3://npm-registry-packages"}},"0.3.15":{"name":"@akord/akord-js","version":"0.3.15","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.15","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"7ed2b08fbc09797197f952a33fe506d526af3122","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.15.tgz","fileCount":61,"integrity":"sha512-Gz2qVpD4zb2KoBJJU/tUfsrCpltO7Ym+fFcyamaPdfLKJSY/WtlUSuWE89WTbKmayorh+gVelJ1+kmkLadDMQg==","signatures":[{"sig":"MEYCIQD8ZdvzdEMFBAo3iatOl5gJhgSitfDBUUnU1whHc9P2yAIhAJRksDjTZlH1/eJPTy8IzU8rpolD1//+N1il+xVpLVex","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9KpJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6VBAAgq85JmkUxDDAllK+xxiYzYfpi9IBAbkfHzK7GFWwDgEKSFY6\r\nLmv9n+7aNw9UXjKUeCJ7/Z/bNGjvUdiNnG08ovTJoZQPNR8xBJW9Mu69xkyH\r\nbXdarYPCqnqXPEPiJwdZ1QdN+czPUsqBjTqAcCIEMCFpWLbvToH8/wHNbGIh\r\nnTQcy6xSd6/14meOu9dxZC0zdWYRWLXe0THizuiFKaSP8CbsEXTyGPyqz+3j\r\nMwsrn9gfHlA867qwaf8pTYgRdOZ+gUJVT9VBbmjTANvd82KdxUSezUIO4MnW\r\n5YxXu96Pc+ZkStd+heCiA8A9V7UFlvMIyRiDwExcj9MsKlISYrU48bcX7g3J\r\nB6vQIHC4Sg0m/AM2MkeZmrwJpb3D6Juh8+eqZan/SSN2gfgvijZO3FXT4b8p\r\n6RN+PSgs8/As/xZ1757X1zCeIhaIuQufBogD71DThu+YhdXuyfu18BrytAkR\r\noK0xlnOv5dZaOWlxNMC+hqGbs3oyfOBz0//Oewd02qiyL4eUvcK9feaW6J/n\r\nV1Vx+xDTp9ONzTmV5VYoHr8Oyb0vfgGPqqcIoWnnZ7humPxDj8LguGpYZ/DW\r\necAuwxeCpmgMOh/IzDhWBZn1ogyJ6gXebbexDS6Q9HJZCWP0MzF/ptuXmRGi\r\n4EtCC4llhCJcn5KbqK3LMdkobs5rSUQo74I=\r\n=zzYt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"2.6.347","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.15_1660201545198_0.4578396975853578","host":"s3://npm-registry-packages"}},"0.3.16":{"name":"@akord/akord-js","version":"0.3.16","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.16","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"902d492b4bca8c1858dc2ccb5683c8d0407b19db","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.16.tgz","fileCount":61,"integrity":"sha512-st0hVtvRjyC14T0HwKSIYTLmsK0imASnS1+xMmrozwtDuW6B0DY6+dB4EeyffuyO//m/F/nMt1NIbKr60kE+Tg==","signatures":[{"sig":"MEUCIDgX1zNTK12esrM77QIqc9iaMUfNAnTbp3HhhTpIWCxWAiEA/kNV+xxEHVOZDZ+mm5iR3hG58uJSV/RU+RLQTHb9eEQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9kfzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrkRg/9F0Zun3v1z+veR61IpNxIYHZj+rK1XhGpGUeRffTVu3Lx+KK8\r\nmlgYaqVRwQ9yJtGdz2380/pNzJ5hNbs2ISfvzW2Tz1sXFRa36Aql9YkbeR7F\r\nmp98Cn9R80MfoDIjOCh7fweKBn5dro8cn2JH7q2Xi7lqNmzHQTMHaFjhIK5Q\r\nxqdcFRFlFLHVjHh9MrP3eD8FhOfX3XEgvrZajtA/yzhNa+IVgJOjT15I7BoH\r\nd8S7BeEZUjBeSyHxcXo3H/i8wK2XufHDNXbh2XyGbjo8utZA0SwpQdLKE9c3\r\nDok8uLM7CDcAXZKyAeqyZGjjVgMEu55AO5uyYNK5xNakdSo56hpN0H3HwjfC\r\nu2/thi6kdnI9HGkqOPDLZDmRazYsTcgxy6VPV3diBkJzgDly3CYxjMHsk8yl\r\nM1bNJcxHdmd6sgo7gbLHGu1pgZSdpn6AKDH8tIjE5VUJMoStaZm56lmxTHkF\r\nCX3iOf2e9y/CoMdkqPBMglVJEoehAGSQI1IvLcYm9G8+5aAU3EY82sbx0+Px\r\nT/M8Hsla/BSdVfNX3ahOIMfziCrCT9+17/FIS4FqCQ1lr2yg23gUK9KToq0r\r\nsWC71uFoIiiIxph2uvdv68VVIYMIXhSlJzHjkziyVG13lZLNqGeWEcl0kg+G\r\no0zdTjUBf9aaM89OyXHOZkhOWCtQgkA4RvU=\r\n=ETYD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"2.6.347","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.16_1660307443600_0.8045580315815102","host":"s3://npm-registry-packages"}},"0.3.17":{"name":"@akord/akord-js","version":"0.3.17","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.17","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"4e338d711a8263cf3e724795fbb411e56ff743dd","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.17.tgz","fileCount":61,"integrity":"sha512-fHXLTUjDp70KQP3tgz9eUDjolblMbo5U5FjUL0fK5wVFIj22kzM9dxGKbYh2O6w4JHDTHfKJJVRsq6U7VGpQCw==","signatures":[{"sig":"MEYCIQDIj6ew8faGJQinuJzuIaEwj1sxx4g9bGCjUA1coIa8YwIhAJvXDxIT+mdP3z4qquZtZOQJzYgyswkXQ2S4/5z49MgY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/eX9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmorMxAAj9JQ5KHSeBxg4AT3NMrrVP574+44XfJcpPnWKVfveOdO5cPE\r\no9XaQiZtGOBhTzy37KqlnWXGkeUef03gVZoHLWWVbNTXEiNH0JFv0YhPoxEn\r\nZGlYsnTOJvaMHAPwv1w3Xa6vVH+rPjawdQZDFZ9XR0IxvLvn+FZ9Fy8My6Yo\r\nLqCrisA0fxX/Sfc2wShVztFT+5KIK3Glim0GhNVkIq8+F2CWyA1cbm0cje5F\r\nIprtadcTX6jurbb7ecZlZJq5XmvdyREpkb3ooB0/At+HWU2dMy9DM1ZpKrmR\r\nVQwVzO1nxYxv+GPf0pyzMizARrAvgYuYjze4h8rfXEuvWxe7DNqufs2pitSs\r\nFW32ZGk71BIWZPfKuHq+hLqtcA/TaQo1O4yJHHEPVlbYBm0AvpJNlDuikWj6\r\nM/B26JspDyK+dd8Tg4nWFct11wcBQrw6R1UrpDqjQdkpqqL7rWbRNvAmSE1Y\r\nJ9sfGMMdyffNE7/JsVmTp/Lm81nG2ARLy6Htu7T5ZKv6rFzY8RTIl6bOm/Sv\r\nFaGryhyPbbjfhpfCQzg4Qo8jdYmY5hdH9/hmWhCU4P08pR6rWJkCKIch9kWs\r\nTICnAaP8AfZ9H/SPuEKABGb/JL3fNVluaAMmamhtWqC3/mFJar7amyIjDJoC\r\nPUjCOiCalftOHMgVzFfpRVEl87O15Yre1Zo=\r\n=HJqD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.17_1660806652956_0.7825129503419397","host":"s3://npm-registry-packages"}},"0.3.18":{"name":"@akord/akord-js","version":"0.3.18","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.18","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"17e8917910ffed5f4f6ffa12e3885e232111dcb8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.18.tgz","fileCount":61,"integrity":"sha512-QA5ul01pwb0BvKzFAlVcEmRtbA/TXwBqFViX6/u2woZA/7riOm+wYe4nPCRvz02KfV7Wkit6miJX7qmFlysOog==","signatures":[{"sig":"MEQCIEuxjvtzuXtNHVUTF0HNDpCYu0TNsnCg7DeM20mO8+fRAiBeeJ1bxXubj+QGqsvwL98ai8IU9CS/uoNbSvehD24m1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCL0NACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqrmhAAmnxZgPhzauv1SkTUaWJu8cGNx6uU5+VV1ZTluBI94bbTEjaT\r\nBJd910bTk7yTqm+R8qpgMzlsVvQKfW7mUpqA/K5TYhNKkzcHPj0p3gdH8PZC\r\nCFHktvV1ampDqptEEFuT7wjCIwftzendrA6WEbTGiFjEv2VkQX1LhJJ/2Zrd\r\nL3mgjfnqcCE9iwfpTPsHwnKQLfKyP69lX5+f3fZ72+UxqkRY4WGTfnuJVq9N\r\n+suCSesYJTQLhYyNjNTVaus43/13DjIAOxmSl/xTBtQ1osek+BwSyvXrZRV7\r\nyIdJLpNvTQw/ZOtUWzcl5MSAZfjHVgxGqka0ClRxQQcW7ZToDzQEc95Lu4y6\r\ne7upwrItluFJEsO4vxDzdTQvXv1j0rsQmS2O0S4/gmY4QnXY1jeFjoNhG31G\r\nAceai0TL5dUKGfrw4PPnPII0xKXp8sieLIEB9E9qlwKg4mYTWcUIyHHCccrI\r\noFCUev+J+x63KYKCoqlk6bbWZkrtUNTJMLpLugf+atUOdFZkwOAUDEJr7gPM\r\nXpBsD2IH0PdMlLKemra0kW4wDRhvtn05+d8fc3XSkkww/YP2jgdHEUCs4S51\r\nFS2rAAw2CrZIDv/j1u9IVbq999OLA0y8HY2DeEVsYqHYb1cAWv9mtdTwnBcj\r\nf8YFhK2C0YPdqF/4JCbcflJ5SGYdOBS2Lz0=\r\n=/U/8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.18_1661517068997_0.39696529823282267","host":"s3://npm-registry-packages"}},"0.3.19":{"name":"@akord/akord-js","version":"0.3.19","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.19","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"d47f3e793a65fde510ee74758fd0c9d1f6e8ae7d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.19.tgz","fileCount":61,"integrity":"sha512-aqOXkdeW9dCS71RVUktWgKjzxAnP6p4imBTsEBmQ/VQuUx5W1oe8Qwci+NmE5iXYi47Rz+tHhst7yS+wsabxXw==","signatures":[{"sig":"MEUCIEX7UuShQhaXYMa8FgT6Qf9e308psZ7MSMuSmMRkgbtzAiEAi9iDF9x7g3leBLVj/2xYsyULNj++KTy/b3+rio+F0uE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCMJ5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2og//Tki0C05nI6pJj71QHNvGFlt089hl6HadM93TeWgL5mzo0qwf\r\nEGSUQdIwr8YdiNVDYsc8/jXQJiL+Krd8+mvAkOy1v0LpCUEDPVdaxsCCRjtz\r\nlBZUH9wnRqDcozPqorE8va7Q/GtR6JK2yqgUlFuRoaV7Zi3c8+PWbKCsb3u/\r\neEJHnMwjuy5Sp4pByJjHD3Awhi3MIQG6GPdzdiHkGZbqSQEuYOspb9gvF3DS\r\ndN5DKJCQzeLcAgMRXH5plAIk36FBxUJIDBWvcJN4GFvc0+O7YjNzvP77keEr\r\n3YnmN6+np3jLMaiQv5RQ0kNUWYqyXBJA1kdHUd7RHeC6hj3sd+HlqLX8jvA8\r\nAg9ZR0v5hkVu2TtXkjMrlUQ6yccTlXWs58I+ppmNZ2+TR/Smjnc12e+qGugb\r\nH8y110BBocmclEkto9J7unN9DX1Gp8D4L432P37K0YYlIgbmiqKaDV2wwW+r\r\nm2ha/QY9Yqn0wVp8gC5kQAkdycOVz8e/BGcHFvT2GBqGW5OKnRnhMRu6Iwfa\r\nGOi2ceJSQ9VJ8weITdckVf3HU35IOdNoqEvicyK4EdBgV3PUP81FvXURPFPf\r\nGL9OcwObIgw0UWzdlpflkcDcM17nkHI1IEUhS+I8na2GUp01IgiNl5ASVXWv\r\niMsrm5r56NTPWWE+cMNTvFpSam27z9Y0Gy0=\r\n=fcgr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.19_1661518457555_0.7503013456714778","host":"s3://npm-registry-packages"}},"0.3.20":{"name":"@akord/akord-js","version":"0.3.20","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.20","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"f8fd747bdcb654beef18f05b226ee61524d431b4","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.20.tgz","fileCount":61,"integrity":"sha512-ZR8k7mr9PV2nlPFI8YSpqMMtiUx4VR8Zfo7yI3KBb6m/mwsxRb2Cgpbtci+0+Fx7hQ/J9YIwEExfbsw9G2CZhw==","signatures":[{"sig":"MEQCIEQKuN/qZtWIBXkUTm1SLG6iS1QMGuH84cD24TKkNliMAiBJw+8vikBSNn9H8h31waO7vnPkZXVQfWoDeV+OY3IH1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCgrtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrCWA/+KY+zZqcTo73TR4WnVFvsfhnQ5kYDS7UMFYe6SeEcq/GHO22W\r\nsFvXr7VaYXQTBWmoNncwwG+2HGhqSWoa1el+Ssnflsi9GMTGtmfa8M6H1JIC\r\n3ydA6Xv2antKX1r8L225mgWAqnmERpy+0t03iIWZ587YZyllK9OPznT7kPVA\r\nAacckBAF8mVa7B5yzFqO1FnAHePW/mpeStA0vKAy/kP0BBiiacDSwjFeP/rx\r\n0x78cwBmXv1UphDZI9zByEY4Ntd5W9w47KCg8xk8mjVc2eKqy1DQxvNzP1pl\r\noIRFXrTsITxLlpF3BxTg1Zd4zolrW5A+5ui5tzPUBa6MmfVeJ/xpj4D7osXM\r\nZVEcwydrnEysgU38XIKV1cJgLbfhplnQoS09fIlDwyAjOV7NMqNpGLYr3wXX\r\n2WlP1UGxUPDf/nKX7RFt16QQ/kFwlPbB3m4OC1YnAOJtb0Gc5p9ZuP5da7F6\r\nGraYJYsC42lmzLVAOqc8qOJBDYWArVrMQsatTzLVHd5j5/8DVelZ7zhYWFgx\r\nbZkufVRhVUnOvZBb5nkuKH3RB7fVbMLWrMuT25FOIBaDem3FhMWC0bqNjAfJ\r\nWsFQVQ3eUht3+B80L6Mbsk443ZnJ0N/2QBbxvXtoq81WhPE+PpUTH8sCoUy8\r\nRNcS45dfw0yyDjfwW2FV5xD0wvdoRNLQi6I=\r\n=+A0t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.20_1661602541742_0.8368163519255494","host":"s3://npm-registry-packages"}},"0.3.21":{"name":"@akord/akord-js","version":"0.3.21","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.21","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"7e5ad83e82a062c07dfca114c6d7c803b5e1e7cc","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.21.tgz","fileCount":61,"integrity":"sha512-MhU2+uUkXb793Smajs1MHUkYLpsKVwYMTRvJVFRgBEqgCiaonMRWfXTjUXWRrpNjGw6LcgZG/O+P8YALHu+16g==","signatures":[{"sig":"MEUCIQDtm5hswnNvMg16bPz/jTAyLeBrREQynToCpgfxf8475AIgGoMIcEO+xsUOWVlMFriWe2GOgCXw5ZpApB5pz6QDe+A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243354,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjC2PDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMvQ/9HDBwRe61TPmHqOdycXbU5zgznTRBmTYiG8KnQ4efa9KyWYuV\r\n+WjirnYzXpaOvqCzO4PSv7EulM0DN4lRmBuLxPNfGv2xtiBFksLoGBxJ9uBs\r\nClF4DgVqhgzbxjo3un2Q2PFQd+Ell512D2z0lV0jvFi15hmqMjibswNmAE46\r\nBNm55YZEb7k0lklefnWCv4Ds1mlSBfRLFyRdjzZt+4AJ/qYq4QxCug0ARKsl\r\nRwjffkZX88RItyAUdYXYy7OV8yxOQ5bYRFQxEWp5haXyXLqZWqxN8+87qP43\r\n46SCAVUoL6EYodRH8l8LkLbVQvFZfUBFF3M3jY4XSk/SzJcrvRg7yOWG9T5M\r\n4BBasD6C8PiLNsPxp0FQXb5RvisbVh805KOyafm2flucjv+sPfqPFYevHJY0\r\nCpvsxSxtiOtoYfUCLIH/XsUDL3JsLEwGh04jKahAv1PTmQ6P5aOWZAGQ7Eva\r\nzDP8Bk4QHCK/d+g7LEDb+rk13OH1H4heabjM4plaTKkqj0+bohXx+dK9tyc3\r\nLtlhxME+Tvc2nrG6ODeL/0Z9+BJvLutVxK51zenqQjp2TvVPERmohdcWZLMd\r\nV8+1ZkrR3r8hrCBXNr9q9pKbpF6ce9Qzp3Fgiq9f6ReGsPYqzKQhBF8jTeHa\r\n0QLiKM5FG421FLi61tKPsUdRGzJyctW2yzE=\r\n=yrMd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.21_1661690819259_0.5011717731499128","host":"s3://npm-registry-packages"}},"0.3.22":{"name":"@akord/akord-js","version":"0.3.22","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.22","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"a8f9b7c399c524803ce31af96ad2546affffc2a0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.22.tgz","fileCount":61,"integrity":"sha512-EGf1xVgh9SgPq17bTqPOBQamWvip4YH8lyABnOH4ODIvRDV7Y7W+SHRJq+ymuScrIQggEk9DAnyhkv7ZuF/XfA==","signatures":[{"sig":"MEUCIQDKLhHgtAMrcqPmwegoVdr3GtJbF8KyBypVU93GvZN46QIgaOmkjOgzf8VTvdppJciTBDwF3p1eOXQM+CzMtCa582E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243354,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjC2PWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBNg/+IF+FWsHGjYSK9B2QeUkctSHSw7U8qpETKtEgeycVC/83q0yc\r\nXgDnOkkXIb2iBhvehPrNQmQBiSPY2SgDWZndm2Dz/NVrjOB+P71wWOP187Bx\r\n2WbMBC+lwMahNAB73zyZgTMcO15hjWGwtYFdpYsQ85u1Zv/62NpUHsinr/S0\r\nzns80j0pNk8S0mRyfzQ0cJyj0ydea4CQlLXJegnFGP+hJy6mzFh9dbRS8d7e\r\n5nBEI5V5wGypMgFe6bA7p8a+jel9BgoIx/e/EXoAJ85Q2WzG93vZeVPXrxid\r\nLYBxQPF7dZC9fG3sem1tEYQCjuwkHmmNNXsTgebsm+m+jPWU3SfNwOInuRUz\r\nbUMmE12pxy/y/idca95YrXoNK8SPuhlw8aVdgjeHldae19eBheWrVdSArO0+\r\nxNEl8Q4trbAXj1GdUAuYKBpnw56GAI0MdHZRp3b0tU9Q15JnDZID3hz+LOsy\r\nWBVcIV5+uWlh+a1GJTLhpPH+yQLKlDvLxrnjN5RyjYoir5r6ZgJxFvXGUTlh\r\nRIQa0frw4VN2tNJ/VF/2RsnbBkPmSUJK6d2i92VNKU2XazjQYcKyrNMHPfm6\r\n5KhYAJfdQYB/KL1B/Gb7gFwmn0psl0WQW8chl6ZpKw/kXh5lperLLBbtGTwq\r\nCNN0p8hHAZLpXbsElyek3YkVuOSxkg1wuOc=\r\n=j408\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.22_1661690837878_0.8849115930388223","host":"s3://npm-registry-packages"}},"0.3.23":{"name":"@akord/akord-js","version":"0.3.23","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.23","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"f35a206fd60cfd0a2a106d229e4cec9e76cdef12","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.23.tgz","fileCount":61,"integrity":"sha512-jgdsvWwjXR+i0JjKwdVIXy66hecRw5vGFpcPk+TOdHz0Y8PWB6IabKCr7UPynXJyrKMcYV/sAO13SYuTgnEA2g==","signatures":[{"sig":"MEYCIQDL6Z98Ok/Ukk7dkIGbUiJmz0ceOQzVHcKseOgY6p3McgIhANO84hHi0ttnb+1nWBZm/FU2Ql7u+Deh8PgbuFaF+ugA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjC209ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmomeA//W2FodRSMKxPeawbXpjnPwnP5fssLo5xW3h6vM9ncN4FMUUpp\r\nClvMdboRXnEdPLYvePYn9Z2R9/C/5RhQ46C8RlRLvw7U8JfwSD12y5DVdDeJ\r\nlal+AeyAPAuMr9gA8GpnJ2jdj+YpXeyC7QmwGdFTqXcJmEOpSYwjQI0qJSQG\r\nDgIaxeMEubKDKbOOV2q8TQ4Ag3O3yV7HO01Vy1dUyWKKqd19/DDKoiz1oY8V\r\nMp4saYYxQgrADHakrPcC0Cl57PCYGhv7exK0vP0h4356R1CoIbVLyq4krLRc\r\nRusVvz9HOL1KOuGq618PyazFJTFgTpaMQgHyGwWTW5aWxxTZawg7GA4GWfeI\r\n0IK1HBjmA+e+SW/3Cewj6TJLFifSUoWr/mBfTWbFuxRWFJ/rTqGup9ee4Ztm\r\nUxX3Hh+Wo1LmmCwXiTgmLhH2t5YRLJaKXUo65GFpe+O+AybJB0bNRZryyfM5\r\naOqsd6HVpePkFrbOwt4ml7VaKxchwXVkFkvpWx160yYbFLYIl1RYTeZcjUKR\r\nVz/cf3OzbSnjte4mT8MvJItzxjFTAo3gL7zrwf/DDUPMdFyhTJvslgUcahrD\r\niCB0vvxiLQnVR/QtI9ZcGdMOvrjR+N0T2G+W++BaILgq9OFwRSYZXLfZ4mws\r\neP2V0Z7WHGTVOxH5384Z65cL12ekScdrlhE=\r\n=Ut1F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.23_1661693244772_0.8365145823295408","host":"s3://npm-registry-packages"}},"0.3.24":{"name":"@akord/akord-js","version":"0.3.24","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.24","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"1516f958714750d08f6a89b8c40deacd0af71ab5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.24.tgz","fileCount":52,"integrity":"sha512-QNL4BZa1QMoXfujtSVopwlKT5WS/YxVGepPHgm2gnAA9ycZazQA6Wuve9IzhBlMwQO1edMhCWmIA8FUevBmsFQ==","signatures":[{"sig":"MEUCIAcr0AA8/kulR+1Blfzn0uArT4KBfJeTIJUDnBS6M0j9AiEA90xVqN9p4Kg1O2EvX85kMLoAJgGWKFwJ4Lxn+OMkOOg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjC94+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJSA/9HOAURDGRZr0m45Hmxisn6UW5cUWIDjv/+w35Evagve3O69B5\r\nAA/iTYSYYFCEITQDcie24GA1kasAMHNnBVbmgWbVjpJVJz+5EuiDJeIEirXf\r\nFiiZ1ewww5pTPxqlcNCTwqjEcBddGEs3MxuvY9b2SD0aE8Ntam+lDpBMDTU4\r\nCroJiojMpxfTlrgx6+s+D+OY02PcOShG05q3ncWwL5gmru6XhtsLdo1kAuXj\r\nf/tMcj3DO1bAnqEiK65WTYmgXG44UL0dPUV8MN1eAokXn2W3KwNrmXyGo733\r\nFxaMYOr0e4NIFEnRauJfTb03qidKmDgrVYhVuG9H5VXJC1SFt5JDs0x7leTt\r\n53xCZVwoAWSo0hUZoR9rMhEcrJ4jNh9BhxBVOev1ODUX0B1pv1E5y9oGn/uL\r\nItrWZpsf7k6JyfeBeurEw5cAawr6W6RugQdPo+P+EQYlhSvJgYHTdA2JLtaZ\r\nn0TTpfDMVpi8vzMuOJ8a06i3nnKPTWyvIFj4hQa3MgzlbTczMyYVPS948LXP\r\nPh0hulPIqIHmTNYHm+L/dCRCjdWxPWLYG/oFpOa3L+KWAdaOmyXL0cgkPM4q\r\nLSh+WZNkar0n7TkmyERAygupMaoRYASW05bXuITJV2CPx7PrwvIDt1jlnq3S\r\nIw6o6NxSj7qcYzcVwqvyYuPEhbYesM32gFc=\r\n=h+oE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"926e7ada7398a4f26679aa5b0846172dfe654dbc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"_npmVersion":"8.11.0","description":"Akord Client","directories":{},"_nodeVersion":"16.16.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.24_1661722174218_0.5047086349853673","host":"s3://npm-registry-packages"}},"0.3.25":{"name":"@akord/akord-js","version":"0.3.25","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.25","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"70b345a3c4010732e586ec6afa31fe8870203681","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.25.tgz","fileCount":52,"integrity":"sha512-CYPul2bLcQt/AsWQuzko9bxtB9D+rSq0QonIZWIRHjA0wxrL6qhOY1Du0q4t4KFZVv7VfzKc4LkYrcT/6UnZsA==","signatures":[{"sig":"MEUCICvorjPXUBUD8dTj50G1Gt6I23la5kF9lDwC0vTTtqsvAiEA/q73biidTcGuVVpWlNZ0CTH+vOVTPZkD1DbhxdrTrHQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDrSNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrsVw/8DLjgOkQcTjy6WAT3UtyzucozFZ3pN2eeLpoRhBYyqshRNgBd\r\nTMf6NcPieqGX0eQb01K7WM7zsNLDfuy4AMyD7ZrMnhKN2YuE4fxifdK2gC/O\r\n0N6i/0nTSvs9xZ9AnDUiGbaV7AreTKuj+ZfacYRTznnEUaT1q7JFUQpQEAEr\r\nNTh0uhqasnVQdkJi6ECpBz9Tjm6I26JJnlaM4tyTQEzPvSrj7C/ggmo5O/T+\r\n1GfxVuoKkuDI+Oa7VRr2USIuGpSQJnAKJGGRqvQ24PqO8zcQJvTkAYkGXrCu\r\n3mWLmkNtEs/x9+DnIRaIoOu6bKLQY3JZB3qGfkRIjpPO5sZIQ3hPQoM+oa8J\r\nWGn/+M4NXk/eddzzg4Ihm5HFRM03YFVvH8RfcFNYyykLv/Vf+qF/yBwASAic\r\n/YShD96NvGscUGOUPrvtzP4e6DOrBNQgfwCiuCF8HyhMtnG2qwo7pPAPGdly\r\nTydJE95dFMoZQK7gDwsG0LLHxSKqrrKd17si7iU8UPRBGLcSjK2kC83+wnWA\r\nfPWsfMfOCZclsAkAAnSsCIpvo034uraA+vbRltxl3evpfSyevhgz10TV1evv\r\n8NVlQ3pFoTxwDK3WNktxoIoSoSfwnNd0vSBkw+RU7aRsVc2NVwSC/RSD7W/Y\r\njivpJsL/Ndw5q8LLxaG2Zl/MMhLdJuU9y/Y=\r\n=FP4q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"144621e8c767d83d044121213b8485d4fb674e56","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.25_1661908108941_0.988843527567224","host":"s3://npm-registry-packages"}},"0.3.26":{"name":"@akord/akord-js","version":"0.3.26","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.26","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"8cc0b6dfcbbbca3182d3442d7ad32d0ecf6cc440","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.26.tgz","fileCount":52,"integrity":"sha512-7Y2toWb29fkiN59rVdoHdSlCaS9UDrnKqNzVka3cfzP9vZj7HBQQ24mpgmobPlMVdtQKYkLZzN8FstqiGfDw6A==","signatures":[{"sig":"MEUCIQDalwBifoI0BJx2m0gQkdglspF31NyAy0nZAcc2Kiy0gwIgJVKZOex4s0KGHFXxgssKVu1qoPnTjp+KtA7qbIRvAnA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDr+wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMhg//fj0CemOivnBn78K9bLu/9C26nxsj0TbJsRrSitBcEjc8qRv7\r\nc9SKRDvTassX3SnxvlxkxYUlt9IcevwZfIf5d1nHiZPJbK11MrcP/naKc66h\r\nl9tAugItWt8VXzo/HdyGH5V92EDfudFQAxyY9MGONK+/MbZoTB2McqJufD/k\r\njGYJA7ry0Q5sphDqyD9X0M+x6hf+dgPJVl+0fski8d4WtfF92/Qz/e024IoW\r\ne+Q3WJTTN8W9+TK2o4SlzoJIV/9kzVaiSVYKYQTu82HIpcrhFPX9Bnb5n+wo\r\nNmJKkFV1Y5pd7kJY5e9geP3AOKxnTQTUJPkN5B2XtAKQm0yVumel/1nh9PzI\r\nvWJzEaiw/vBo33UD4Mnge45j2chHlR+t/KrSJ/UQCloa7+IxifydclMu3NdC\r\nmP1ydDZbVYSewXVDE+0ir4TojD16mnSwGyEWCxq0Rc6WdYyQ7aVZcyYGPD4g\r\n/bjtVjO6ERBKhXBSdx/8h3n5FChQiFigYF2WJ+kjPulHOY2qYVCTczyN8RFT\r\n6HoAiI6CKkD0qW7tCVbfFFZX0y0jX9ITtdIrCOEgRVRkRxhj6zW9tXt2b2np\r\n63E5QSyZmNnMQQzwFnzK641nsFOCZaO0ZWepgsgRDvpV9e+OJKvHEn5B9c4s\r\nfP7MQW6yza3J+gVOsi7zwkld0hJWAmiQqRk=\r\n=CcoI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"aa36fd9d7be1e8768941bd3b70a2e3de1de6c0f8","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.26_1661910960598_0.6437800903017292","host":"s3://npm-registry-packages"}},"0.3.26-rc":{"name":"@akord/akord-js","version":"0.3.26-rc","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"ISC","_id":"@akord/akord-js@0.3.26-rc","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"dist":{"shasum":"16afc4828d215d98647cc9d6f4a156ce543c070c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.26-rc.tgz","fileCount":61,"integrity":"sha512-iFeqC+HcKQY8A46a4t4JvRkTWDvjCe05dmqzRXIwXwaxD4eKEjfXWht2wrjyUvfCZ6vOt1ZgZmNeSIU9BWAYcA==","signatures":[{"sig":"MEYCIQClPi6I+ALjiaAXIqv5tq/ZCCYRSNG6sXO8A1X/SdwGCQIhAPMeB3cFCMPK7kQfW3WETJamwxQ9OhtYXJlWxw7+ID4s","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGdAfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpjsA/+NmDsBWPcowwOr3sOwlG9CVkgfQHfi8/CeHl9QXZ6B4hSO7pr\r\nZiccMmH2HZE4FDkDQlksP6ExCwDe3oBO+nufH7MpSOQpuWK1fVz7ol/Cxb32\r\n7QAbFlmVTML+7p0Mx24cqGCjV4FThiFjS1sOkPE27D5o2pCWh1VblkxgMxRg\r\nEq19Nn+hxJMrcUkkykVMacjCVa6onTtmayBmScidDUigyT70okX242QyqHwM\r\nZ5Jn6Y1u2YMn0mByOV1llkyQbB9si32YdjQqiD50GDLQL6UBRUkQXWzxnZge\r\nQ6It0U+byISwOMJzGpIzcylbw45upnrSOjHzZj/PaZU1b/Wx3Hvg2DTiEJqe\r\nBULKOL3R+AUOWFcpWcwGZKbS/u8n7yP/3NFdIhLqFMeaiAVXMkbycw2v7nf3\r\n2VjKE9EB9dxhz/4M/VASUz47U6+yAB50h5VmAWP/Hdr+9h3F7fnsnAqIyx7s\r\nQxpjvsty4hZkXAfYT7zGnUN9E9Cg7SLtXT2X2sBN8OyQ3sQ32AJ/H+mCB9zq\r\n3bpYDgTD/ZXWSfliacGWvsi15mTMn8YLaxsFRUPB75CvUpOIi6jRG+C31wmn\r\nYmYcWzPpO/zsoWzdUdMLt/7Toi7221KzeRei4fZpb7N7WC+6X1RJy0Ayezj1\r\nXTuxcQE0qjYRmvtWkSMRR3CrQmNlxq3ZOXw=\r\n=HBUP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"description":"Akord Client","directories":{},"dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.26-rc_1662636063728_0.13436925271591904","host":"s3://npm-registry-packages"}},"0.3.27":{"name":"@akord/akord-js","version":"0.3.27","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.27","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ab52eaf94c55f408f3d54e4aee4e2d78f3055032","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.27.tgz","fileCount":53,"integrity":"sha512-9OtXHPVhIEevvxwUhjFC1LMjBWDbOUZWIfUnMpAwh6GmZTfVgs4eZfawhKLbHkrpUAUivupH6nqlXTbuLO8oEA==","signatures":[{"sig":"MEQCIGtpsnruBGx+u8rMFY/t8Y5vJZqGTDovD2EM5xq/R07fAiAWiszpbF+PkufYy0/VhoJCqkQWKGIs9zD70XCUd9T9uA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245362,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGgb6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoieRAAn27oh1I8em/RHI9iPN5Mj3JWKgFFM2iHn4yRyylyV7Xk3Jtv\r\nZzGOLhHdNiONHA7k16yaYFAqbyrFzjuvL+u2VGyvkBTjWxAesOoULwN8ifH0\r\nBXlSTU+C0PCNAleYs+mTOvw+AzcnPXgLGnQGev6ynUqZQftOwdLHSe93Q6PR\r\npveuTBUQMe+6m/hsFU0sjx+fxdzlD4RsOGbB5UkVQgTeYtl0I1iUMPBV6X2M\r\nou0gfGHzgM5TA1XM0szoNhi7YzY7YtmaVYLB+VzWDeBjZEhQhEiO1C4zIr3b\r\nP/UfA3DSAHrQijFIvGLOomhSMr/8ojb0rnYGNjG018Tg8IV9YHsmg/SqbwJL\r\n4z17TCJmutsqdM2lzErjW5qIWvZxgkiwK7zKPidxSsv2dp89G5sHO0eitUKN\r\nPJwPBKvj1VBhxKveGAR/EY6H96IofZVvXqz1p13QiXkEn+uwUEJ7lhODnDT9\r\nBN4aKzp7lX13IzT22CTRxm8K/C1gUlo9pXOMiaZ+OJWCBav0aKiEnMrRq6ZJ\r\nd8y7Qv4e8RHHXlKNmxHFHZcypY4DSYfD2hVy8bayCOf+IwSXKtUf9AsHFjDp\r\n81fRrKtM6/s0tp8T2aOvaXoY2TwJUoOKrQ1Dd4eUb2OfucO9Pbb+FfFX2It6\r\nDoBHmBLLwGqihUMt3tYCIIc2FXmwRg5nPAE=\r\n=w0Fn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"a163342386db2ebd45830a3003d5d12d60c02d85","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.27_1662650105941_0.1939571158715161","host":"s3://npm-registry-packages"}},"0.3.28":{"name":"@akord/akord-js","version":"0.3.28","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.28","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e8cee351e14abb9e0c4db942e444af0acaacd0c9","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.28.tgz","fileCount":53,"integrity":"sha512-ZVcMeslHQmLlI/ohuhoE3MbbjdYtko4QIhOoerUlgRID/Kab8il/SXkSUn4O9xRk2pCfJjZJuFzMIUYvqcdwtg==","signatures":[{"sig":"MEQCIEaMIY1MlIbDQJLKclYmHMTHMdofK6odG2TRtVTgCPVpAiBfW+TXx585tx4CIaILMkBNxd1Kr/zVeZzQP++xbMYPNA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245396,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGyLqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq8Eg/+KDmddwCOi1/qyUmkbbDuLZvom9+yoC5xp1haHqsWAfanD3Qv\r\n333a3OJIa6TFz4Fc+S7l/A6ybeTF8kBzjl1Q7R43Mo4suRwCOuZKeVihT42S\r\n9Xe5bwSXHaIaTNNz/Q6XIO49HFoLRdAINRRTYIqZb+WWrm2aWIQS1ZPB1Wf6\r\nmIitxOLbQV4JgJOLaQoyo3/Dz9d7vhwaFjqMRPYW305BIaHultSEG7tQQUhi\r\n/xIL9lb5EaVhqumnrFJ9PeB7BEh2nX8wzWfc2q1RdmxMZFJ9Pu6qAEpf3s7c\r\n4ih+w8pe6sbwUKWo3eiETd8hdkg4frLw4dHzh8hdQBOpFjbNUhxx8NDVhIFR\r\nkSGaxJomMr3xgQH5zKCuenopj+vYmFRZLh4JFkBynzNuyny5O0ja91wYlfyu\r\nVDGBlqFLJWeFpxn8a3DsHSDlT9d4NTnwSf0b257uMZtL2uhfyAYUCisqlCSL\r\nsRoZ+OLHsfbn1JFqzbc3cj1uNT/rn0yJ/kyhYzWUTJ5YDgQSvGi3/TjXTe+M\r\nb7EgoOehFXvxdMVdADg9+WGGJOuIWb9ihCNXjijWZpxxIcje7qgYms6D2Z0u\r\n59o/pB7fxbkPs24f13HAOiLeWiOuCwxxdqcMVYElYCTRELqK1yyrg8EGJTN6\r\nEqfotIZs08vg75Thy6hYcVzBbqSuNOrQoHk=\r\n=6294\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"76ccd02bc9fa70e1740515d4eff89d78af90f249","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.28_1662722794780_0.9281024263645166","host":"s3://npm-registry-packages"}},"0.3.29":{"name":"@akord/akord-js","version":"0.3.29","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.29","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"cadb0b1fcf4b0df0128100e5b3abe9c9ffadb351","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.29.tgz","fileCount":53,"integrity":"sha512-J/O6wSBw18ZPeXpAKgDQRwH/mAFozdY23DO6fqcshfaaqdMekueB70A4IXLH4JuaeNmUo1k4SgkYhNT9XE9fnw==","signatures":[{"sig":"MEUCIQDBJfmJSLn3kY4gvbHKWBsmqjX2EjN0EQ5/KZyMHfiOEAIgCR3Hj6HUqvxeiUyAH1g3bt6by7fTMwoCQkXb8L47UAA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245992,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGyXmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpxGA//fdc3g+DhFj8ABpd900x2zkxlMN/dju4t9MTJMMNz+4k/qh7d\r\nFhQVi+SUC9sMZ9vQ6kgaT9dszNMGkThE8LxyNqDvFUqa2dT4fBbmOjDMb2yx\r\n8oAks6eBGZ5i/qAOleUA6BGi3PfHAt1gAFnDSyEZhxU+ZJ2a14ENjjS2AhfN\r\nM15KGqQHDKjKKZhhEYeqIaZsolxVptkR5rmA+nv1X+SrV6+iWMxWcN8a+eJK\r\nSSuBXxadB9XT/KdqAhiVPm6Iw9mGZddbAEfLKxXEeAz0Vr/JcfsZP/fAZFdV\r\nghX4m8ZgMUHt5vIhh6IAdquMu+lCN5fTN9+nBesfAl9Qcb4XXmDj/078Rjnh\r\n6P1Rs0wO4iMKL3mNoHqjH8CVojE1CZ6xOJjmoVzFz5XeuWIsMrWi8XhFmal7\r\nav5d+lF40mH18evGBXOlAgl13Jamt3wkPc5QIw1gYpAenss90Oh5IdtoUmnk\r\nWUWvC5oWXKBHWM1gxX1Kt7qzUIilrM1uRth13REh9/7bKcm3T4j//mgCkSN0\r\nF6tOq+YoUB4yti0V/FwyCy7TcCk127aqd8v4XKF1Vydd3krJQdWN0+bCj1oN\r\nnMf4UmGfbtyaZnhNRgjFlGpmRf+YvmZARCPKLl+frffbTF8ZPb7XPfXKzyYq\r\n7X2cX9tKqDg2pXRBM01TieCamqfXhVV6PzE=\r\n=cUuP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"76556a4b346a398c3261d7f6642d5cd8ef9c4efe","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.29_1662723558053_0.1983437497113123","host":"s3://npm-registry-packages"}},"0.3.30":{"name":"@akord/akord-js","version":"0.3.30","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.30","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f7cbfb166de7bbb2b747fbe5a4413ecc28ee0736","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.30.tgz","fileCount":53,"integrity":"sha512-gfksYMFUMfLDKHrr8+53qjgIViP21x+QAcPfSDnr0Tk5iC0mWgfxCpHFIp9fl1lvxqwF1+ADXv3UReB3+tXJXA==","signatures":[{"sig":"MEQCIGXM7cJaEDpeeiYpcQx/GJOwBgIOtlaIDh7pXkvFG6sCAiBxQJzCMc/lfzP7I85HnRJ4J8n7T6T26uIwzmHrZg/ZKQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":247515,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHywjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcNg/9ER1FMmK2JoeIG1Qbmq5qk19FSrPiLBpxltgO2aghgjCOoRKe\r\ny2QhgxnOD6CuSprOX8Qkt33AYyQWXcgq64ZJXe0bellwb/rGZm5ZaSwkB+cV\r\nNRG5Et4q+IZwLHzWDLM4BGvbfPmtqOmXzm39LpDGWplg/IMuJil9dHmITQEH\r\nb/z2FKbXRan4sAXTUmBemYiUIopHK6ssNkxC+znSmoW+bd2IkGcHnk6tFi9E\r\nz/CY5LQ38jix/sZsxjhxFPTFAP3Na05kbI9nukSy7b9EGG5qFzOzkFMvuC3y\r\nPlXBDvm/chOMJe/VCfVQSvIpOVUjptLzhcHyWCe5QonNCIbXI2aMFEVQwMvi\r\nLzi2JRqfWH95dUdiMmP7T2zXqZ4tqra4wpRohlV92rOnOoXJvBWipIvP12Pe\r\nPXxJIgWbXO4CtkgIdJwY0P9/lyZdHwlG+oyyekvGZH2RXHFWkVJbqwQLIlYR\r\nFnc9+iUzDmzmN+BSkkoOUk6rB8A8uMyIkYQ0p3YmphiT3jAklbtdwj7wxnuH\r\nw1gLXDDXtfGT8WwZs6uAJFVe3g0w04kQRWswObTF4qXUrf+VXmYfmosaMX2P\r\nNlcF8vd2VAHVVDUbMjnj/QlIQ8OF8OWDQu5fKOWqg4rVt5wQyVsjXb6ywUcN\r\ntdK1XIGIlKyM93tm5LkPt+VGXoIUmm9fV3o=\r\n=+8uH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"c2ccf257c55fef35cf327709153310d485912860","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/react-pdf":"^5.7.2","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.30_1662987299512_0.1951137223515942","host":"s3://npm-registry-packages"}},"0.3.31":{"name":"@akord/akord-js","version":"0.3.31","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.31","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f96c7a4a83fb9e7388c6f12b9689a339559c304d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.31.tgz","fileCount":53,"integrity":"sha512-B2SmP+MJvVBaUCLU3Q3uQkasNHDcRI+nYD9nfSfDAdE3/IMBal2/4Jjo5gUxprf9bYlgS12ysNuB4o85acURvQ==","signatures":[{"sig":"MEUCIBtfquHzO2qRG2DfwVfRrMp6c0nJQ8bJ9ph1ntPbG5MtAiEA8DZDzjKhT8hzTQ+GDrk7y4PZR+xzBm/Dk7ocNxgWWBM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251218,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH0vlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpMSxAAnGnZDGbSVTaCJ0/Mx7beXY9ySTo8LveXS//LmFeUdABMpLSL\r\nYePbzqv2MSx3qtvnivCPyb0djWThQ6dxkINL7czhiytxd9LbUXURtIPzVkV7\r\ni7+i6HPwt3lMlolGRVZ2dfbcIKi3r+WMMnmk/xXZNlS1eRIqotxNk/9oKu/X\r\nz4IqPHaRxlDO+VAWP0YcUNiUjv127jk+/e/UCSp/rdIQTjg/WalfDHtTr/P5\r\nuKLOJ0/c0Fqi40kBv6sWzTwQzrbjaQZMr9YDRg5PYU9CCetYBL/1lqPOgsMh\r\nXbyztS4N4R8STu2wb/ZxPDf74Bg1+aJ2aj6vg3zfN0DeA8hTIUm0L503oFnq\r\nf7lPBFAJJfYPEnB/5RKVouZ8hshnaHg9ao5OZeCBZeihqgJa8k/b0+u9kvnu\r\nv7500pTI+fDyrFBMF5y1+LqaEB4+K4erjL++IeAjRoSL9xbpLgorcz/vG2u7\r\nmhWoOVVH0mDZ72fxkb3Jn5P//kzeqSIj63KxBaX3Pni12vrEYEcRdco711h8\r\nlAQMw6MLE+GpDHS/7EUv7t8DcZ8Bjr6Wgk1IywFlUS8wYYhQPTQwB/gVwPHr\r\n4Db03OncWMLUQRId05ieH3zFM1FYMJ/W2mbGuDmnMjpSRrsrqlFS2Xjt57GL\r\nh/Zv6eD22uhqmp3+0RKAQygZ4Ej5mo/6daA=\r\n=CWZx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"538ee0e42cb5afad642f66d073c6ba2a0695d8ff","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.31_1662995428824_0.7014687901382108","host":"s3://npm-registry-packages"}},"0.3.32":{"name":"@akord/akord-js","version":"0.3.32","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.32","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"70805cf176e47aa068ade2213bc43665d35d2c28","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.32.tgz","fileCount":53,"integrity":"sha512-g3FTL9xx3oD+yi0gProWcyKeaxdz1y6k8bBKzc8dze1fdm5pgXrjC2e3ZLP+2Mt0Nmt/t9Hs1hqf3U473e7wiQ==","signatures":[{"sig":"MEQCIFz1nD8yrvhQjhbBq8kcYM9+XS3b+ks0S+NtAHWxnL9nAiB+wH91AdXMgKt1JzLM3iLjm16rONjXjhrMcDULPJofhQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH1MWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoYqhAAmyJsb6b21mbi2g4vKnHGWC5IOuMzzeW9t5irkHwW9fY0za+X\r\nBnvEmd0aLrAhk07r2SdgW3qXz8WWDD1XKHJZzuigBTkzfbHNZf4xqoy+NYlR\r\nxBzMJu8ki8K/kMeLfu94Tz/Y2mQwhqh2B6xlMy+HsmhotG99eQ9GVjJ1oCUq\r\nbqQYjG95IfZlvg8j1QRTs+jQq+PZr8fmQ2DdLV9RORvaVHBKtKfjb/+H8hzY\r\naWLZXs201xf1Zidac4ienxjf43uy9VHkvi4Kt1OYoYT8fPJWd4ojNjDYTy1N\r\nLP93fV35UPjLfKCobVpwx0gt3LBaA7hHEM66Nh2J6cQcbr4quE6jm0r9aSFi\r\nd4DU4+OhPRhylcw8YR3dQKVAdfkTEk9tb+EQdi616LOeuZioL2/+Vd7r43wR\r\nsAG1wc0ph/iE6snRKUkqLu8w+D3kS5+boyq+qzVOM6LUqnynfJXtceLnZfLO\r\nCI8qixbH5/ytxcdIiuiIS2TQCbj+sgpQfASkwvXa9hLmSnvF2hRW5614kfUJ\r\nM7+OlPX981QD50ZzKDoV/M5HiBdEke4Uwv0/MHPE/1rdAX3JBfW3YAUDQXHo\r\n07t1cEn4kWCq6zTc7inh9BtX6m8iVFG1VfwtUBpKty5NOKm8IKEJpay+OBNc\r\nPb/hp1nAEQhHMJzuL5yUoEVMEhsWDQzf8Js=\r\n=Susx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"b0f437ceaca390dfd87e0a2280242729fa3a1655","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.34","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.32_1662997270506_0.7735518912927051","host":"s3://npm-registry-packages"}},"0.3.33":{"name":"@akord/akord-js","version":"0.3.33","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.33","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"77cc34fe70e9b51dbe1ff65ce52b88db446608f0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.33.tgz","fileCount":53,"integrity":"sha512-AjarNcggEFa5XNTdg/QZDmfJ6bzcIRASIWOFywLoWH91N1Nn7Fkp2G745z1AGZIceFWkg2KtC1EbpOT84V9zjA==","signatures":[{"sig":"MEUCIB0PQyzxd+yG6hOVLZzDW4hqmMfeMr0Y2SmzjUzul0NZAiEAsIBI9YwqboCXVHUs2CXBD8bQczlKA8yfnJ8A2/HDRy4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH2ZSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVyg/+NHmuWLFWQpGH1A5UCLl18eY/8FP9CduTZoqsA/qQuD39+auX\r\nBE59TKO6WdmAII6NqIJoSTOfd65Iej16IR6wFHH4cTKWV2W1zFq/zpH7LAcZ\r\n1x36gfbqWBa7cwtegWs35CIfLMM1MpMEz9R7NlBKMrEf3Fh4a1JEw8Fs8bKU\r\n1onDg9A5w2XCHhXgmM5O+LVhlGX5E4YwU/DmSSuYHENYBZ7jl1iD6FYyv4/g\r\n0ndjWpuDicejBdNePy3CC2MsCHdTwSkv22IKo9Absx26kuMZ/M+RhRJMVP5+\r\n7wmZ4HvTb6hBQunkg2R7mfk3PkHHrEdXtk3nMRd5tGccvTo11/JgYhU2mhrj\r\nKyNgujNY+B9TmPYe0w3wI5OmQpyP4ced8m/TBWaCRg+GSb2+QgyNpDbfVlpa\r\nrBGloG6+n7oKMJNz+gkGSece9HyIJYp5arD/BkaIu9AiV19Kfg3QQnXYV/dz\r\nnuTvm1JfxCT27HbNjCbaH5ZP3uL3vG5jE8CGBGv+JgSqNQCiiyO0CNZ0VdaU\r\nNFzR8zsW4H9mATnYS2wlaRC5xX4FvHZ8SN9+hBt+qlZ1dNddVEovp85pyKM2\r\nbY840eoagAeRQEkP4rUH8ZLh+T70UHHMZFnn5Dfhk6iTy8jQY2TtFFlTcrUU\r\nzQmK4GTG1N2ttu0Wel5BvoVwZgWhLA97Jlk=\r\n=HJ5K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"58d05e8bdc3767da81208e5d2534c8a184fcaa33","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.37","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.33_1663002194048_0.9050921610917462","host":"s3://npm-registry-packages"}},"0.3.34":{"name":"@akord/akord-js","version":"0.3.34","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.34","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"346b954cf6b0b98ac831512d6310781a9c5209bd","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.34.tgz","fileCount":53,"integrity":"sha512-USCzdZv+HvKDq0myzcrg6YYUUwUE71LqDmLqW90KUhncX3IpVJtjkDy/J/Upe9jnWwvnwcL404UrUUcfM71xiw==","signatures":[{"sig":"MEQCIAPCv3+dmp2/O2xGLhS8digGjA1SLK1t66lHkYlY59tlAiBzfsFqNpKpWOWQsqrLDUjcmokK/bxiUlG61qWFfTUudw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251253,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH27+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqz+A/9H07ZiZ7GtyVFmt0AloNGdSac95qZE9qK5FDZMS87HujTeIkX\r\nEFi/FRcVMydGxHpAYUu7ujIuqqFKZc0lRS9JVJ3poyvE9jbnJvZyqRvmKL/w\r\n+y2cq7S319AFKZEjFW1ZmifYzw6iGlALwMihgBAhtAKg5X5UY1dGyluONeIl\r\nbyT1gYch01sOXtuW3HGVOmv18tkUnqMu4lAhyWyBO+1yWlIs2Kc7MQaaljYK\r\nTQuUknvYQsyhgWIFg5S2L2Ncxz8EnH655aoW4VLFblejcA0CK/Jv6ENMXPJ5\r\nJuf2OaMxuMGFyLao4WZrQKO9Zu8tIkp2tzre7AT1K1lh1rpnJDemqNQDWMve\r\nUY4SFauapr5vVbGNqX1cK8gjRelSZfVMPER13PH8XLnp6F+ITmdwscolUbGa\r\n20Xg4bL3IbCt+6qYypBOcx15+7IcIlh7eEVIQj3lJdD3I3VLX0dFRBFiqbL+\r\nvkBPTIIoAMjM/59q8mmo+jq+FShP+Hx78dOjnFP4UryDKBfNRZVXvKzTVcqF\r\nB3kuhaa4ZCr9POwiCMbsUBHPiO+6uUOa3z/oK2Jij7Co7nkso8TsRuP5W0Rl\r\no7Ly2z13Pf55k+xBxVn0uyB3mB3BRPKizDbVZTMJCA16aWpKJ9OzS156K6gi\r\nC/s6XwoHFUnQ//si3wZYhx3ZzdhPYpqoYmw=\r\n=taq8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"27b918baeea0be65891b4fb0351ec0107942b017","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.37","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.34_1663004414352_0.701386016671858","host":"s3://npm-registry-packages"}},"0.3.35":{"name":"@akord/akord-js","version":"0.3.35","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.35","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"686d80ad6d1ea90a6fa5175a271307bfb42e3583","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.35.tgz","fileCount":53,"integrity":"sha512-QAhwL5lM2Zan/5rlABFan+fZ0eOZGLL2u/B5ljvBfHr+ejTClq3mfIKA4XfKYbSYmJhOKUDzX7pMfZQ3B5anFg==","signatures":[{"sig":"MEYCIQCH9HrWP2b5K0mcISse0WsTSmInua+BrXDFl+8Z93jnIQIhANg1BoNq2jZ54NJOFV/xSLWZpGxlAoLlxnlsk9qprEf2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH3CeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmohQw//TaoKd8+pJALnOxmOUCsCKGJ1OGepDHSLA3fnBfWWHHcP4U2k\r\nGXKCvwyN+WU059JI17k8HCVdPy+rG7fnrmcp0/qsq/jUNf/ATRhsWxbh544/\r\n24TWyzT1uiLc3CNQQg1kP3zmeiiRcJWTX35W7EZVSLwkRNl9CNDdCIYSihkv\r\nuFM1RcL5919oMRQjYJO90chFP8N3iDRlYRpmQHMTp2HGnnZAmRmifB8HdhVp\r\n087gGfULD8iHpuIoIOsxG/Khuf61KgXMz6eyxNGQHxTeNjjiS5G0k24fVsf7\r\nN19o5uHwmjybzdTjscQVaqGOXbPOkL15DXv0NhMlQ8TYunmH0nq6H5Y3geLD\r\nj3WZyroykENK2h7Mo+5fczA65fFm2lvmLm1QQVECtJ7oU35MLhuqtl7Qc2Jh\r\nXlTB33lX3j3QEsF/XMC1ySztqssEoXbdnvGLTx7MFd8Gw2VfB78TCGhHrR2x\r\nb0/rfpAjc8ApLR+DHcwM52eke9sn59dc56uiEvmG9Fcmll5LfaTmmRDhcPYf\r\nYKPcNdPsdMAxHrUJUPyUcaUNzKN6eTV25fdA6QrtQ27M2VfjeFg/FbprrVRB\r\n2+lG2pAGrdoHmicv6JosQpvNPE1lta9DUZ/NnkaJ2Vw6QLoyAfJK9mQPzd/B\r\n7ZdWKjRfxgRCuvoNjg+JM3D+7+s0UpBRd8I=\r\n=6HDn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"7df3c47192fa23c5249668a0cf02998e9e3ece45","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.37","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.35_1663004829817_0.8679670172615019","host":"s3://npm-registry-packages"}},"0.3.36":{"name":"@akord/akord-js","version":"0.3.36","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.36","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"2cafbcc03bf623a6c02ae58df5f7e309abf094b9","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.36.tgz","fileCount":53,"integrity":"sha512-rCXIXvyeTbtPdZhbqj7LbpxAuKMEnQIb4UY0X01gqeurWXtKirtvh5TCH8TRuBP7KHjab4lgoLR/SI3HaZpnVA==","signatures":[{"sig":"MEQCIA2MxEVpF1TX3GOEhZQElAX2gFRammatzEo/+u6isLL6AiASdUAcH+Otm7rkdjeVsyJV2c6D4G3IG8u7mRLIH/d2+w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252125,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH9RXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr2gxAAmr4vWvSae+CQjVMx7ngvC5ukOJGUY2nIhb9OqGrUj7xdI725\r\n6RqTedQBVS7rBdQJLanNn7FxrX7NPDHJaBh8b3HNAUNmfH66VfQxaY4qYJTt\r\nHN2fTMl4wkF+NNCZ59CuzLWK7g+5ipVQ5ZqCuvgAFIKsaotR2upl+e40kYH1\r\nushrpLhgwIjyqahgTKm8jNzl2ApEbqISoOgfvnaaTy7tyDUCWxBvzt369rcY\r\nZxFpprzw0v8aIUNGID9/KcqoXmW4AunSuBNSZJsku7voyIVuH8+IrlLAHcSh\r\np1ltfj18py9aEgMxTgzYmVwrr2CIB8ycsbTedwi4+SeojvzsTECMWjf6/Uba\r\npHUaDdTq61Tv9wRJ8CmVOjHw53Wga6FkJHy30l5rszsflMdtNFLOBSSqWCTF\r\nm6pJyWd1HXzVgoI2AwoTFIIGUPFkffvYcGyqKK3cTPs44VY/79gIaZ4lHJQA\r\niDx5XVkP6d0cZODZgb0ECbY3YQBCpbdIyKptQ0e9tQZPLj/IR5mNBlnCOUku\r\no/wAL1O0+PuE5c6gu7BssJ8CGkK77+MxZKBvjTLni3/pJYt9nnq4OsPPAgNu\r\nGeobkO63eE3FieqlknPtnKQCcVOgkLMVqOFz6CycwkAN3+j0NpVAiyfdBJy3\r\nr81AANaJ1lLNAx80SyZjHd6+RTzySppu5N4=\r\n=q14f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"f21b2ba5059520285cfcc8056b19e41668bc6d93","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.37","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.36_1663030359684_0.10470192336206074","host":"s3://npm-registry-packages"}},"0.3.37":{"name":"@akord/akord-js","version":"0.3.37","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.37","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"2b51635c2dbafbf00a803f1f4627a1118894d93a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.37.tgz","fileCount":53,"integrity":"sha512-0ZDAAf9jsH1HQleZsns+GUqzc1Rrll4yYIrmtTqRyBnpXZCtYTO0KoKPvUzF3Fbt5f0uJ/6jVlzv7ozNBsDreA==","signatures":[{"sig":"MEQCIHf3avVMbEMjUf5p7mj+LmArQ147OtQ84ZZ9b68MavH4AiBZ0FHSG3r+uB2w1AKxrUjzn5zLVmCm0E+IlOQmxllJyQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252126,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjICdjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmojNQ//Tl5/gcXeAbvYBYXFxBmko/lca9AUMs8K5Uk25ExxZT6BOZgK\r\ncL59fVAMa88LAmHPp+ZRFlhybTzq40kWyZ1uaJ+DU4DW3Gm/K/A9VBXA2Unn\r\nZGM04hZeK89b/A267wdODCuNuYAoq5bRxgz75c5amYwtAwRzevK4PaWpMX4L\r\ndk7RVOK6n4HXSWIk3Eg7ZJgLqwy/emMVynhoLJJKwq1rdSy2gqA486z9V76c\r\nCWHpuxhr4Z2Qu0KEtQ2HwrAujER6G0pdqmGjdpwP/VTm4WtXt4nkut+BeN+A\r\nTm+6hu9GreC+JwT6JfQqpNsB8hOklsPkE3c6bHTi4TCzh5ZZx3+XhXV9AVgK\r\n5HYlTOuSBzE7aN4RFieY+ERRAoMYSjrstyJ/k3zyjSxamQf1UPMeEu3eA6U/\r\nCKAHHaHpnF9fgXgE0vHRkuFNawOBOulnawn7WLf+Tk0nlg5jWlt50x56eecM\r\nJfm942Cp1EOkVe/9AQas0tIY6Syr01S8q0BEi9uBTAOZscBdyJVuyRSZKGO7\r\nM/hM4vGmRrUoLtGMkD1QA8VxotZH5grubhnWpEJklPgFIc+giaxCmlxf/vaE\r\nRhxJ0moQt3Av9flBckFqaw9X3OKovY/zmfyAZ+cVwkpRdQDTDURJ/j37U2Xx\r\nEKNwTXaQ4bd15sDWjqWJFc6NATJRwWX23NY=\r\n=Okdz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"dfcf64afc201d7403f346a3a5a3e5b617526c1a0","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.37","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.37_1663051619263_0.5890356309150784","host":"s3://npm-registry-packages"}},"0.3.38":{"name":"@akord/akord-js","version":"0.3.38","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.38","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"da2af45dabe1c54731ebf6a16b9a972a7eed8729","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.38.tgz","fileCount":53,"integrity":"sha512-RkyL4xIKUaU6Nj+YrUvSBU972ym+0wqFdq5RjjpNqcL5yv88TLWUkrYTQSVyRSzj8pBk5Co7D3UEMvjWIYwxig==","signatures":[{"sig":"MEUCIQCxyWT0dfxaSSRNO13trpNjLRAtnVasf+GT8QMumJjVIwIgEqYAUb/jZ8Em5/1QQvOzUsgXoakFgNPOe/q3KyhYft0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIC39ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpp0Q//Ug1UzknlpHuWp+AnFX0J5LgU7cqHocTj45M1l4SIlUyeaUvt\r\nc/8KIuX0HC3c4eAWXIe7kWx5CUQ35h9IxdcyMtQtaq6A7iBiqPe2a1cqeFQv\r\nDqoz98iwJ5Qu1XNSVxfWE+gwsfzls0GZPelnLvHrzBz3eNB1Bb29TMFMLHal\r\neM7NLzU2iQiT/mc4dX6emeoWUtvS6Po1HVx8BDKm7pkz1kXCpj6PimSMVrGs\r\n2jK3HzCF/HHEcDiTxlrHF3WoEDYOCsM2qclblpER1Ew1W6y6/R5g3yM4Piga\r\nceNaX8pPIpQXs5ueLjJOzdb8PtOGF7nMT4cVOj1b3LgKRVVTEo+Djwttqznh\r\nwkqmstfdFWUAKf0vyNkpB73LXCra3Hn6TyxS/kKgSbm7kFCoAa6LpPEHyauY\r\n0N3rikvCbRT1p4jJOP4Ie/WL6u2+ukRg7Nd29OVPgzqIpFhhJRNLnheSjs0W\r\nkB+AjeqLeU+Dc5AvxO7p5CrbR16c8HqTDNpCUMg7Qd+8q+h2uRFO5P5fz5ec\r\nDw35OmrgLApbJJ+V2cK0JfYghRSIzqjP/UuRrQMGLSk/C60K/IlU5DpUjkZQ\r\nQKqa39Ld5hEEOxrzGfCHawEOhh0uH/h/Reh4CUC6Ddi+rWnGm7x6hsfDyXGZ\r\nMEBgz8I2TX51Cb/xqfWjloBNE7mlKf9hjNE=\r\n=uzWU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"d342f7c0ecd6d80a1d90f9b452402ff8d4d0249f","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.37","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.38_1663053309758_0.04848070390728321","host":"s3://npm-registry-packages"}},"0.3.39":{"name":"@akord/akord-js","version":"0.3.39","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.39","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ed2d2180b89fb782f556d34e6301e29b652c8742","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.39.tgz","fileCount":53,"integrity":"sha512-3KP5yvOHKArvAj9bFIYWgLcGa0GLg7H/srJyuGLKpEYsRRS/CcsL9pNpo2J+jnc/iA2MMcd5c4jjUH0OWl6mnw==","signatures":[{"sig":"MEYCIQDkQ826abEcr2+DrSV7z1ely4mqj52tCjPQbqZoXWcHEQIhAOXvpdh8DSpmh1+IyHlbFhcRRocKGILZ04hOINC5zbGw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIFwkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo1uA/+OsbsAKw+RlnORt+6O7rV1Q2HnNOweKx4nTILauuV+Q6CKzQf\r\nxWxUGxwIJR32GgrVp0MNxIjECQPKTHj8+gXlkCsVK8c542m7F/5hH+YeA+jW\r\nzoAt8IhWn8U8doyx2Trjrt/EvUdnaVXlqfoKvYG0GrkeqYcVXQ7nySmFWnUN\r\nvP3ThhG9+DtRKWtnVesLMlRsVQdsqmfAxFXi7qUs1eHSWt7NeCik3IMdborN\r\nrtp4S10whnp9oVuTqKW42Qb258hcmSJn/TeZ7Q6KJSzYHjjtEKWY5Km6pLuW\r\nAcwo7+SADoQjICt4ioc5RCWBRXL0REuRQD9Y7m78O/tC5HjRwhm4aSrnWlfZ\r\n7thIbRVtNaTsFkJOcFHZUBa4sY8JjuuoKpBkv4Fen9tYD5MTlqmSaBSpGGeJ\r\n5WPflSCBuXUS2vA5R6YkM1+lCZi6nyqBvbYDLwCGtruVxKsWG9gyLxaW/RQQ\r\nym3ata5MQjNxQ/g+XOVw6gtu5/UxSPb/IFku60HJd8IdGm0e2mFWCjL9qnkt\r\n8VhtpR+7nAyR421KtHg6st7CRVPdHoi3nDFlhMRdLgQEI23ItWHmDpZXSXCr\r\ndFvU/mAzqlGszuGOv0Comxt1Lq35kXwsi3rb/HlbFRqyKVsPRkq6fla4ihKg\r\nZBLUvc2oQdG7KVfAmbVCd/KEsRRD6m4CK+Y=\r\n=5CPg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"6697633e93563ee234425500c8f2141ab424d454","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.38","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.39_1663065123923_0.3361453271795234","host":"s3://npm-registry-packages"}},"0.3.40":{"name":"@akord/akord-js","version":"0.3.40","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.40","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"afd2660183c66bc01e2468e7578695e065bcf318","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.40.tgz","fileCount":53,"integrity":"sha512-EoCy8fD9aqcoQU2Rgm22voMY9i/NqxazHpwyNsVpVcXEfRaUh6dWTrEJwnlCqOAR6r8dCLsmOJj2GjlTEZ6F3Q==","signatures":[{"sig":"MEQCIFpBnb82DDvc4lqUbC3pICJeYz+sA9ZeO5M8Nx4qZDdaAiBIWxhVK/P5qL2KsI4ZU4cXhoPaIc9daJWhXhAd72w3/Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIQORACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDhRAAhRQrF+n8jSwQdHxRs6Pd3lN+poHikn9mlwm86xKNu601+KB7\r\ni19pmxutH6UiuY+DtJ3x/KoCKqkVaxpLoNoN3jkcOmI1MnIX3kxX7/mEIDxc\r\nD8mlYg9F4Y1iYu9k32iE9bPDy2gKg2ByfuiVYaa6k8GkcGRp2IDVkCBecbzG\r\nenrMasr4mgBzlMJcza77GUXx/indokTr1IHlUVFbgYt5LaLDUqxCrXMCp/HD\r\nRzlQm3nmHhm0l8z9FbohpQhntBsbVykIRg9sH7X7yic4BScJMYHP81wrRnZO\r\nyB50ZD1M2gVXzclsIZbm2J65BV5sV0di/w36LqNuMr8OhURB8qKXiD0Hjbda\r\ne0fr6oh9kP/p3pfVqdVuVR7pmSu5EJIsnb1NQZcULsW1LCLvaBiFrGWzVdJ0\r\nlSfAK+WlIIwxTBycegtwwb03fx3LGJGVq+UWO+1wdtt5GS2TJur8XzXeLbgo\r\npbejQTv7kLFbwFoyV5v2Y1u1sFtkm0VKQ5EsaSC+foA+XM8aZkEBZin1Ph76\r\nOfMENb4l9Rzr5+b3DBJvkuKxlZ9Wp2FGjo4j2LETcAjGoc0Yd29YJ2qsRmWb\r\nV8FxYIYnrYWE+0tndH5GLk8OGWisMN6MrN0FlDlN1IrBnVH8mRw6/3MM8tcx\r\n6631QhuMxGPc6FFMioXh9+QFGW1csU4GWj0=\r\n=V4H+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"41a235c869ac3eece2f24cfbdd930df57542643a","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.38","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.40_1663107985039_0.37487344249236876","host":"s3://npm-registry-packages"}},"0.3.41":{"name":"@akord/akord-js","version":"0.3.41","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.41","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"dbd311325c1424f8c7c9849eeeba6c6876f54a0a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.41.tgz","fileCount":53,"integrity":"sha512-EFlaNIDECnfYzG8qLhI17kMgzZHntqIsTRqg0/9aCGT5/DMj2cf6Wnr9zL+6KUA0ish3yG480TYB9VTA2c+76w==","signatures":[{"sig":"MEUCIQC8hVe5a2/bdtNYOJOGyfHT/nbq+4QPLe1ZD1qGZ7nI4AIgNsIMs0hu1g+3EqkKTMEPJK/MPhRAuLW9yBxqBcdb3SI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIZGaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpxDg/7BlFZPfe7jXDWNTnoy9cXbHhwLW2J9YnhF1f3vO4mwj+bL/5Y\r\nhHnJ9RmpfSxF4v59SlZCTWx6IDD8SeafhBWDEeyxiwGDfzscF0VZkL2dOkN7\r\nvc38kTOgEU9rDZqMb4a6gSeoCraKb81lhHu3i26obp2CvejAA0YKJdOJsaBz\r\npMq+z5aX8eU2IlWMCVCyI+ruL/+uY8KljwkuXjKcNBML6/hRdAt4QVQf4ysk\r\nL7srS0h0M/mtXu0dP5Nm/7lkKg3EpYz7gJHrmUfcS5zYTVuSDN/O6pC2Wzwk\r\nEm+4qNY6U4Zt1Wo64beSg2vT1QvtjzgzeHPCPL5r9ubcELS+t8Z8EKyAHKPd\r\nS7VWD94Cn6xkEKXrgbEsRqG1OnWVk7PaCZf0DaYiNiScaE+6IMaIqHYTZmU8\r\nUZ2U4MpK7lFWxUiHnVB3LH6cwK/SqolEwnv6YaIKPifedeIkUetdOR6RiW6U\r\na31xcP0o7z57Js9E9LcDtK9hSjAhMIM7ikK8quhZoSZ/qAmzkdCSaznwjwhB\r\nMFZtnPDx9so7X211ViHmwlaGT8RH4DhxRFa2SzBY1mFlqVBOFdLP/cPbrNGM\r\nC857GXl8qheomBvK6MEm+yz/MvGPjrGWmCa2FuLFFTrNLGtHIfjUgcMcB3sn\r\n6VE9XINK3F5B/12+wbph+JFbezNyMw4CP2s=\r\n=Ug06\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"4411ed64ad557826935e44a9be8867f2eb1259b3","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.39","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.41_1663144346699_0.38380848382994204","host":"s3://npm-registry-packages"}},"0.3.42":{"name":"@akord/akord-js","version":"0.3.42","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.42","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d9e5fe59490fbdef53a56bd900a3ace712b20318","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.42.tgz","fileCount":53,"integrity":"sha512-iCqCfC+rRtRB+Hv1v3/J6A6hhoVCC0GnVjtNzwMlxQ+eAs9OP8kCt/bRzVUNSl0YoPCl82Uu6nkr5Zi6B/kztg==","signatures":[{"sig":"MEUCIQCo7sgC0wr3ivh6QjeBQq7Dq4YQEHuuUj46R+XemAPo2gIgNSw86OSE2CE84cMY94+uzHYXX7R8RLBwPV7b0SE2USM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIZ29ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoC+g/8CKE7eQegjMVe84kqXCFUA9RYQaB+BU1mFsvR8FAnbK3KCKtC\r\nECIBLl6b88Vu89EP8RoFwKFjamBVp1dWU9Hs6EIVwPhrOqo8dCGjyat0X8X8\r\n1rdjFz2DUnKbl9MQ6yxE729ZwZU+B2r7BAwEMogGH8rGNyjlf0BSdtqtfaOb\r\nCmZR1nAO7gpb3JoEk/416iGkUsOJrDZBHnQzub14TS4y0bQ5LpQyjipwvlzV\r\nL7zmzgVxNrFIZAxuiL6rT+rnNYAxfgucCnC+u7+FXfgx28/XkEiGqNim2Khs\r\nOLsEifwxXi8JrykhVZ798vdVAmKjblqYMFrZHRx6OxeQxWcGB0OKkt6rhVp3\r\nwj762MoqbDw0VAcDvZ1H3bSW/vVVr1wbq8MNrgxriMItkYoVC/pq0O8EhEeb\r\nGjQ6JMto41XEf0dLwYBPOdYr2GmOnTKd+WQOl6IsGRj9bj9zPTUsNnBAvUzd\r\n6pj1cUALAUQQ+roeVuP4ddnhgHvHSpdkz4fEwIplH+xNowYCjeeli+FF+Tqu\r\n1H5ChA+uZsneIcbDohLp4YOMcxQTKDkerJAln0KbiWKNxVpb3Q7sI2pEYEdi\r\nq4GYPti+4p4OefmShBIMsCKD+6lLGZCnqoKiw+i6ebH3aMilQskbovg2jWT8\r\nt8QTmEQzKLgYBA7Wr/cTvb4LznKG8x5HxJY=\r\n=sUZw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"1add480076d71f97e9f5f8db7e467c8d5c102194","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.39","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.42_1663147453422_0.6005911588420654","host":"s3://npm-registry-packages"}},"0.3.43":{"name":"@akord/akord-js","version":"0.3.43","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.43","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d58438a7db6228f7d2564c58f2232515f2b9ab55","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.43.tgz","fileCount":53,"integrity":"sha512-Jrp5S415l1xlAThMzQ1nB37onZ3wJOHQWeoniwunHtU+uqDE4LgoM4EM60kZZxDvzdaVN5QtYhEm9pTSolzr/A==","signatures":[{"sig":"MEUCIAHqFtaayI1PeaDjA1/pdG0l0LhOqIxf9sMS6BSXnAiHAiEAmgCpTFzVva3MHr5WNXyH9bfpniXUNWAmiMdLK2PtYOE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIffeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9Nw/+IC/+sO0qkJGg1+Jr9kUTIda7O3Abo7cas9QZVot559OrX9oT\r\nYTQ9l66BKaLIglD+hA30/DmtqHtY804sMgoo6H5wBPkApr/jNACkSmAgFGQq\r\nEP9tkrT8Hq3uoquSezPTn4tcgfafc6T3SatCMdX5WW1lfCK3X4c3VqxBdSCr\r\niOdrIljtki7XZ6nzBWyFFKi1oj5DRsOqpAFEKyAnT3+ky9ckHEt777AV1TFW\r\nKh6easjhbqGNIpHWgY9CgONrHCaa6BBEeBIa588IFcXjx0b3SjNjavLc/vhx\r\nicBt+FhzdteqhDo+bCSMkSS078DQPqGz9Pya+eUaA+aHnXRf29rWtP5FtKSS\r\n9cwAfffP0U6I5UbziLKD+HW1uvkknhacDWvuOdcv5jusH7tRvurDiVZRQxt5\r\nD2a8Li8+Mibi8F3i89mAMUUCK9vcR5cznyIoNLs0bt8g2qFk1mY/Xi5Z1Nov\r\nZ4A7hXvPuwVs9KL9kmw8WWbJ5ncXQOGHxsQLtoun3cehye9lkSmExiOH1VSK\r\nKt6HPNEEsxAkjDiXCPPu59TOnZBFuuiPAMR8NxJT3C2240bOPYCNFjery50J\r\nLgnVteeOxKLIspXS0rvsYDvb+X974m0DBYGXW/P/SJ/2cU1Ty18AIA6prhMt\r\nwTfiVtNGEIk3UT0U8P6DTFiEb5nTPkZq7YY=\r\n=uNZt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"2167d585e8149de3fa42713956a61a09f117c6ab","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.40","warp-contracts":"1.1.5","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.43_1663170526589_0.35940256290853934","host":"s3://npm-registry-packages"}},"0.3.44":{"name":"@akord/akord-js","version":"0.3.44","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.44","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"75b4f3b1e9f35167f9d7a41cfdedf782855b54e8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.44.tgz","fileCount":53,"integrity":"sha512-qXSnVCh5bqpg2WQ+Rxd6KzF44SHdhP0HNYujdB3G0E6TQ1dfGsm9ZyiJpGcyhT8rdJD4KEeJzIK9hU731i8JRQ==","signatures":[{"sig":"MEYCIQC9ChVFOilfvajpPz5ePSDEA5oTNATIJR3uP0b5Ngf96QIhAL4P0DaNMOYCt5gG6JTFEbVeWw0iFJiAL2kriBbasQ9w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIhA/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoshQ//SNS9big/zYVSVbb1vCgD6dWacjIF6EOhM1uZWuL+DM00BGrt\r\nqDZ9/VZoT8Wole7uiD87u06+eDQcrmxPo2IxEDHa3+gE6Dbad098HgmWg+d/\r\nZyPFhbt/3HvjAUeCJx4Kj0UU4wMmd9qgF7gQoq1ozGakjlIP0e1kVD1ZTbv0\r\neatTgDkpafkNUmKMaK8Rax04tmGVFNCzcwpQxJ+3/lqzJnSVmTkkUqQUrorA\r\nzqOK9Rv+wpUaJM1WTxoCdo3OIBy9S4kXOG+uUvC0S7tGqgedA3jBlapPTw6R\r\nVIjDy5yFMHOPvqCkLykjMrq9FbAL3wUt9fWrScEzZGLE+x6+lUqh1xc1GcPI\r\ni39uOV2SBTiSxFUgvnWUkrRZ8Rrea9OjUFbW6jkxOe3lOYroIhPCY4cy+qud\r\nf/+zHQ46Go2V3ro/Am9+cdTw1Lw9Mjd2lgh8310qUZb6iS7Cy8NwW7MNyeFO\r\n/0LGriU5XwfeZc8bObIwsoC//LnYKJTzZPo0bF1l0ldlG8aNBu0ypfNTV1bW\r\nhbf3bjFbCotZBMMt1QXhWqlpt+f6EMg55LVm/0xHfr1t4ZutxD+6trfoab0u\r\ngMvVjdEAHAKs5/hczunVeXPYqjTODySKnKohiXIqHx8Ih5cNHWrxcO85KUBr\r\nSBi4EfRlDk6xaq8fC6Nu/uXlsXFfHyrEYzM=\r\n=ceWV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"d264872e80df920f5bdc62297325a29744c235b3","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.40","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.44_1663176767560_0.9654158902977743","host":"s3://npm-registry-packages"}},"0.3.45":{"name":"@akord/akord-js","version":"0.3.45","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.45","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"739ab7a0eac23aefc2d1604d18b498fe01152503","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.45.tgz","fileCount":53,"integrity":"sha512-lyHOYnEw8Q6McmqpfbAk1NvWButUMvhoigIgNqQInqO5pWLOVhmPsPdXWAxp7HgbfNCt/8FIoqTX4JdyGnMqzw==","signatures":[{"sig":"MEUCIQDdaAIEcawD+mZjfN2t3HicUOVJ8MQdjHgBSayhgmTvrgIgHUYU54MNY31dmPjzoN2YXqw5KaiDDdCLJ5JiKrdmaZg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIjiiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrynRAAnXA8/ZnbCAa+Hb5QujU9YQJSDvAHHET5FHYNKjJ84uI/lOdu\r\nDoVNy8X1ys4pMNVgWwfrbh3Im9nReJomhVQkS676wk5umACQRMJOhZWstzJx\r\nTuiRLkG8R/qLycC4NQLvHzKGzlCYhPUc9HSl+WM6eQltZmvYfuPLhADd4WQM\r\n0emXmkAX0N5EVuacqoxU6tPF2RW6RQAHAiWl7Uq2X3l47oE8eWlyezw/KTvy\r\nH1jcdQhl8s4ptFxhsdZbx34FxkeUSD9bxy4y9rRiqH5QVt0cuJkzLq8i/urb\r\nsg3h1u8THqj78TC4uB7JghLO8GCpcIWVA6RclMxAZTs0IsgrjFDZUDkdRDrU\r\nM2SkIVhawBUvKxqH2Wv3CR8d6WORnoX7fk6XQARyCgIdiJwaRub0XFoXJCvj\r\n+cvMcmr1S3A+DRsACCbmCp/Zhisi6/mqFLa97D8HF5XmXcXbDJBjXp9+x7ur\r\nHwAv5Soi05wgPl7o3hf47C1LQhdsDVoaQgi+1X2uBQZNhDcoZfVmejYMDGSB\r\nBhxEAKeDubSRz3vCpoAnIA6fVAKnCAWaJlY8G491rUxJIB4ZRNmv4RP+h39a\r\nhv6rGQGk98O6G6BH4N3PtK4i7ZWAASS70cfaLOcmNYqO/XMbyYqw2PpMrHUv\r\nRjrbd/2nyYPchXysBUQDdi1lDK///275dFs=\r\n=EFpD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"a1e4607a2b7410b8ee0b5b8376feaa6a2b2976f1","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.40","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.45_1663187106132_0.8798560847695567","host":"s3://npm-registry-packages"}},"0.3.46":{"name":"@akord/akord-js","version":"0.3.46","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.46","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c259f7dd9358a94a28b4d76df84cd940f1c24793","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.46.tgz","fileCount":53,"integrity":"sha512-7jOujLCr4FpcA4em3nofOtMKO5xlohsh4hJz2Niah0Tj3RSZKWea9WRi7bOlFYL9NrvvLPX8jl7TKG2B9X7lyg==","signatures":[{"sig":"MEQCIEbhzObIPjgyCJk0PgmqVgvXDaDO9/Kf06WJV6ScS/IPAiBkETTVZ5wldhiqKc/WvsVQezua0WZxFDvQmHzIuTWpvg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJBk8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHMQ/+JBcvL9zkBYCVFwiuMqaUTlMYDSzpqreevPLPCd55weFa+ys3\r\nKgvHAU8n3Sik2mLStSEF63EQ9Zpt0AireTj3lqqbED34C9cBHYQEhXfYlGkj\r\nnh0Xa/O9+3jY7/1zMrLO/zT8H4zBRBLA7xAqLTrkOZCVLPOavfZXQrLG8qec\r\n8vxdLpGktLB1xPc87hDZ8+rB0NLbvGNRM2stLxylz+3XOJeQtXI95rChZgDT\r\n8lk8q+hsDaw6Nhv0j0rDCjkXjAP/1jct/j8LlpEJM6ElH8yDT/9FqlhnDGn3\r\nLzmHH5fONWO7Ty8WCUqYCjnN20WZhsjp2t+kc+EYIQb3w/Yhfe9DhvmC0hdv\r\nYCsBt3QtL+YXSdnr17hbpvNlhrOrjeNSWv7w15VnA0tyL7UGb46szKW6nzON\r\nhQfwABSJxwxefHsBoYp46MAof2wf6/H+a12VnkSE14dZmpJIpizIReVElzuT\r\nbN+uOgjGjX46ENidzA01FQTyMgMYL4l+3/jxAz3bUAAvrwxZNCIQRQ31i+7I\r\n6uTwivblICVDbBSEYtWBwDAsFq/wLMpSCbIn8pzfLk5WRYfACoCYVS6ZUIjS\r\nK+LM29DZn+u20KZ9s9a8BINjZoaWxHgqxAE8iMMpIOXGVYNZ6bUZZv4NJIrN\r\naBy9WiBa4eNTvkviS1h472Bt2aFnJ88DK3E=\r\n=/Aks\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"1491afb4301e6143ef9bb7a6c7a6b3be409313ea","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.40","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.46_1663310140373_0.11393869302054616","host":"s3://npm-registry-packages"}},"0.3.47":{"name":"@akord/akord-js","version":"0.3.47","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.47","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"92b30cad0f6d21e90c150dde15f903d845be4977","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.47.tgz","fileCount":53,"integrity":"sha512-pYbBm+2ZymS3Ot17D0J7obdq6S5WFX6GWu5Y9mofBH1/pstsLcURxoD9/b1MyjW5gh3VYTRLXedVhBTz/EC7gA==","signatures":[{"sig":"MEQCIBVaGEByZInIwkug/AA71+nAixlFBsTQf62S/C6tolYfAiAw6MH7+rLgAbLLWosfD/kMsJH8hwVtvd6Gi3PuX6Gf+A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKaRtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSaQ//UOzsm0YhwG36bRBGBcZYgVNw85m7QKNRm3dU/vM6Mefz1bY2\r\n1d9nv9pIEV8bX6v7pcbi+IsVE6PWaiUw20v7Y8bpDzGFSwXvnKoq10+m+I8W\r\nRU8iUIEdUhV0tQIxnBt7/6iffx7yAkWDAQY/BXjZlbg33OyOkm8+4ImfzjC1\r\nN2SZVcLO11hNlsLxHnGn2RJ0rbGXpdH5zW9Cl6tY5/ADW2WSg5Tr6TF3MGrf\r\ngvIqowwhHYgkgkBM5mUMYcY6RrkoEj9LoFFGNc25ppYfyqbpH4QC5jqEPQKf\r\n+CkBW0S/H5oNh4gQDm40SSPPdvToAXB1DLs7A3c5lTScv2e6YED+MC1vO83o\r\nMvq840F7cKG7eYBI5b4yzGg+EBT+b295ygMpldi0i5F5kblBlnAFGZhlZrI/\r\n/2yIp3BCMKywfB0qrUqGh22FV5A5YhgjMK4ShDmKgEDSKmdcJzjH1zwt7uLI\r\n7lWMt8god2nsd4+OgsSniMETlTzujqFlS1UiXly9XTEgSUU0Z1oo49ptZLeS\r\nSsoOEcfiKCKTRQDQhLpXqulJb6TJh71UgxI4Qn33Qg2b+hiHAd/DCnPu0MeD\r\nQYLp6gjg17jh2q8cOAhcSZXolw7ZqgMqfs4l1kcmTSJOjCQeRZ8+uzCqmzhl\r\nfAndJxdUOmD3jAAcUSwaew1MsdPt1rLrIwY=\r\n=d2km\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"b23d51e028d38a859dfc49f7fb0c7bbd44061e3a","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.40","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.47_1663673453230_0.6237540203522001","host":"s3://npm-registry-packages"}},"0.3.48":{"name":"@akord/akord-js","version":"0.3.48","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.48","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9d5416a5e3352dc07ebb1c9469422075d81f4ea8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.48.tgz","fileCount":53,"integrity":"sha512-jJpyA7/ZkhCN6muwtjAHjPsLoVsbSN6r/KpXFUGGI2b7IJ+MTrJaWfX1zZ3hSJd69uygKX9KkJi56Nij/hCVyw==","signatures":[{"sig":"MEUCIQDdA5gvgA5VALppu8IxLs3sJXi4elbkUfAj3dNR0bpg0AIgbfNQQoPupWEEqqoSAKnPR/Bx/o3twFVnsmNFL7zN/sQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKbWbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJOhAAngnpNypuAqP9NqEvyS9AACEKyRwcLKyjeAhi2f8zG+hNZHjO\r\nkmUIe6TRPYIDPLDZZObCGlcCVk8Ry+U/40UCXoHrXHSck07RZjSSiK0DLS7W\r\nBM6TqjYDlk0Qqx1toqgno1aTvNLEC+4Y/BmMbwv1b2WeXx4F1eRv4T7FkrPV\r\nbGyuvQFd8FQjma54WxJGSdYZjsQgv12FZLgDXEb7CkTMfZVs/m3CFeTxMEnc\r\nwHLE156VzvwziVJXEkIn7tZOAAAdgKQveBHRD0V67VEf4vUTaoLeNyv1RSXW\r\nk8MSj1+KlM2wzJyEkAf5IFj7oyV16/9fApvHV8pAhQMvE/Ebxq1xEIgLing8\r\nKP6bQTUyUvXoJhlriZNSn1rul9w5uiIpdwJbcRVTTiL6zoYl7jFpjAj++hp6\r\n2iOOZFdPYBpbGYacLHvj7fhxfDesel3WnjVjcwoe9AZPEVVthDPZVSRbD7tX\r\ntFVQgqyD6KdRaPXg6dyGmUr2kmxDerwPUuBGPuMJP3tfoTzBnyg2ANw79NPX\r\nCNXsu/M5dSkWiy9RmlI6tapgF8yic9gzxtFPTlpCmqbtDLjdWUfSngAsYUwM\r\nxIS/YiNW8QXavehJ4fkv0YoqElKsT5TGV4yQwM0sUvcpFrmi/TC8/qeLOlu2\r\nSdZ9fHE2xFbkGaOWMJKfvFu0PMHunOgkLcA=\r\n=+9bh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"701f26c0620a4a423a76e7db329668fa57c60984","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.40","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.48_1663677850904_0.15517104049043273","host":"s3://npm-registry-packages"}},"0.3.49":{"name":"@akord/akord-js","version":"0.3.49","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.49","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"2b8f3438d55c4d0694d80be7b344bbb6d955c201","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.49.tgz","fileCount":53,"integrity":"sha512-3GDcY5wbDhXXTY/jqlsnnIpZKQCOLaZFwX2E436Ch2AoKW0/SwrpUwMs7hHHxpjK6qj7cZOWltJIVgd/vR5NlA==","signatures":[{"sig":"MEYCIQCPqhQkV+EPxzeEa70TBFo6SBzSHxgJmmeAcQEnhlJ2mgIhANn9o+ztfutxJ5nVHcdFetEzZGUD6ZJdj/FzmGfSRvN2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKb6FACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpwIhAAhgjVYrKPomMJtAZJwjITHJO8xDNrsfCngv4RLZL/ujoOEA3G\r\nXcpkuaDwf4WoSsO5H44EYa+Mo+QPAQf/16BM2OLrKeIrwM70DRJtLG7eTWAs\r\nqHo+dON3pDEXWC53rpVb7Pz8sUBsKJQ1X+uwquZnXFjAIG48ap9phEaJSPDR\r\n7Ak3P7hZTVFodoP8m+woCGwIRk8IPDpa4LKEqMcFd7B5OLyPRvLFxCl8cIlb\r\nSJOTpfB6LxjJnNlYeE7f6iD2Foj+tPTpj6OlfHH++3CWnrNEBJbS2z8/AebX\r\nngzhD/GB9/gg5o0ODNlsvDdBJbc8mwFXPkSM4xk+dvKfRZyjtl8adino/GsG\r\nuOvlmpFPAFhVOE54DPHxMv/GQJUOF8XZYkGKUBiZLy5SqR96jpAvY1zu6wAI\r\nHwDCskIm9rKPFXVAFy2+GUN/cULsSwK3m8gt5QirYuhlj4JVMD7aqzanbVSl\r\ngcZbRIaGG78+iRYEPovDDUG62qb7DqI82CAKpP86Zsj50cGIyZW67vZKtz1w\r\ndw1vkSiD4DKtbYrW3vta+nZZoF1gLu8UfKCj5Ftt96K6zawXLxpsVuKDA9PV\r\nt1v7FPXQZ7o6cOdwC+ejJ1thNoQ8MfszJpbzpLXay6a1Sli6RD+SxkOtIvMF\r\nazYCmpVkfc+nd7yBYFj8TMrQeeI8XeIFlEc=\r\n=ACn2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"9153a36e0915ccaafd3cdfe51a7124d029e847ec","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.40","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.49_1663680133095_0.8005652695620529","host":"s3://npm-registry-packages"}},"0.3.50":{"name":"@akord/akord-js","version":"0.3.50","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.50","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"efb26c3813cd63fb518b9ca4bc5090589770f3b2","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.50.tgz","fileCount":53,"integrity":"sha512-ODdX00aVxhAUl5S/ZNrLdePOMOj3MfT8O+bbNb5WNqh2y9tek+wuzwg8x6A3PAK81xEO7wmEAOrt7r/22ALnyw==","signatures":[{"sig":"MEYCIQCTPdIi1mXRk81qGBRA2/pBgr6BpX8W/wjytlWeM/y6RAIhANHHOImXpMdyV3Y8tK8EtE3ipoCtYNgkp+gksOi+CURH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKegbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSsg//eeavDybAAaI6Q5MM2WzudIPHSvb3wCk4lZhzzWO0cpYyIsJw\r\nrIE7e//HzGAhYMmRVXdYTMOorDM0zCYu+xYczUeoFKy0wkFHy8YIWpHBrkuX\r\n8e6tdFBJXcPNULZQyhTgaxkioSPMLa/ywHoGvEUmrFqRN/h3nd1gnW9EEAVj\r\nM1NKuhEpRfiAuGHuc99E6S1mdhNWnU1qybSVJ/qvSIZNJZc4U5swAsRL7dKk\r\njORmYIMT+O8lJ/C17c6SiEQn3PastojCvG7eBEFavPOI0F0afejk5p5XRWft\r\nOBchTfHjnxP5OtkLNU+P7I9gBJh7qFzNejDGX8biWX7RheXwrmyw1sAe9x6V\r\npzfF6A0hWy6OsyIER1JI9Bf0zD8+srmJaWu1NF8AkYDA9NvnwM6cZ1iSHxvV\r\nUA4VGStmXD8PfsaKofBeiOnF+DTWHtUlftdW5dTR1Dd+b1tJ0Yp5hFdrRn/K\r\nqIGtrhZ9UTJgdEkGbiCw0YQ6pl7hikuAnRKXSid628HEYqDyqmethKUsBded\r\nKHn0SMBvQkZtRQUbJQmbAmnaUhaUds4V+9qkWiTKb6Ofv+n9gP9KMaXIWTn3\r\n/XonP0mm+YnXLYnf2hgY9eNiyAzyt3YjYKGWqKVN1FXAPRDrocCV4kxaU5Ji\r\nor2Zb2IkznM8HGS0jXWo8kmfVfojtkTHSHU=\r\n=yLLx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"9d2ad3e87211d5981a0024f5a846b9312b75cfbb","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.40","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.50_1663690779356_0.7194457253123783","host":"s3://npm-registry-packages"}},"0.3.51":{"name":"@akord/akord-js","version":"0.3.51","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.51","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4dcb3e1fadc472816239e95d41c173871861338d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.51.tgz","fileCount":53,"integrity":"sha512-XgThAg8KJII33HoiOB/xgOkeAwMZS0u7l8UYEn+p9iFU/WBCdSDPNW83e5/PtbHqACX4pY5qsQCVJbyoWBLtWA==","signatures":[{"sig":"MEQCIGgEluz+eOEgeb2v8tnZqpXwIVIvQLZUawQEUmeM1JflAiAydvF+JPoFExU933z/WWg+a0xbM2hKM8eSgFHg9zlxZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKfNiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5xg//QqnLx5aBqNAx2flqpYsldjXRZIxl5kgid6RWBUma1auEOLIW\r\nekk72fnOBQ+I870OPOe8kmWq/PhAnAhlK0dLA1QZImBfrcxFgv3n9J16alqh\r\nXdvrpkMZw12i/Uk/oHvdh1ffY1Lm6AbrDlnpi+OxTbAvNDe+jMR0hExWFJmU\r\nqySfohlmvnlMk5dCsM9lU11OCnlqwb/rVKzMpr7euD3zEKGjQy+ogKx769a2\r\n4rlJ2fgmX6H8DcCEdxpoiLcqfBapWGxDEf8WvrgT21m3o51Lb6pofAZ+x8l+\r\ni7DtAL1uOGT9iNg7e8BZHh3Q2Oihd9E0vfJnznJflXV88bbYubEjdBzRcP6C\r\nD5TPh+Y+6KArLPWb36QKaJISdj/ZoOkroWApw2WD/SKtDkFau5qQKmNxJtN5\r\niTioe+N+EdSZqlUJ6LeScNkBsCSWXkw+GdceMQkK7jSVRmEl+jsCV4EhA5m+\r\nHWc9qpsdHMNqNn7EspHsDXRX4bRVJB14CG13HBcmiOGchzrvgLUV4IAQ/fhD\r\n1bkASxyXOZS29Tbd6Nxu1AR4mqyseMa/YNPeryuRUQExEv3Yh8BbY+umJvj/\r\nf12mMdaTZxcHQph3AvZm1dPrBZOEHm7HsmThNz9sg+noz40ckbrzAe34/aXA\r\n4jrQznMC2BHOOk4PZ6srGegM4IPYOiI6jXU=\r\n=EWLC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"3b49d908335fd91792e9a718ea8c47109e37dc96","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.40","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.51_1663693666404_0.47355353768826647","host":"s3://npm-registry-packages"}},"0.3.52":{"name":"@akord/akord-js","version":"0.3.52","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.52","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"aa20bb385ca525bbad8167d802f26730c462f79a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.52.tgz","fileCount":53,"integrity":"sha512-9UJvZROFXX7f4zcUEPXPzz3rjSD167UePCxQUJdwiRjTIPRECovgZrVezHopY3X0BCJ/XdpOtI7OAWhUaDdFHg==","signatures":[{"sig":"MEUCIDuyu2yDVON1PoY5aF7LrxWIZP/mp0fGfkIGIcxG7eTTAiEAjTLhDaWeoMjEHsrIkgLP0ey0HwxqyzuK0zxZa71HkdQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKvrnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJpg/+K/6NI9M3yEYfw8/jUPmH0ycdIJ+2B+daHysQzpntVKJGKi9O\r\nQm4UbU3DfQofRPj31etrMqJD9IqYWOKK9DwyKIimUKPgB9Nm2C0seOpoVbKp\r\n4u/p/n/5bVsIran690uK/RfSJ8da8mN1wnFMwSUHEcVWUSjHkkWBIWsIwiZN\r\nINejhgys19FKk6ewnrybfECT0HW7zp5aEM3Ffe2LZZhUdnQlalidlxtkoWSA\r\nXN5EBaRYvWp7RdYn9cEGza5d5oH/WctdpeKcdqSNEKa80fWKy8jhx1ySMHnJ\r\npxki/+g/XHCC6FFS4r7YRksW17X0kjoUehVRRk2PtpXwXw/63w2MJvV1rJ9M\r\n8WVZ8FUxN78bqi4b/nuJamAZtctPRqQ8PCRZIqSTPbcaCyzeWCiopcRtxxyn\r\nxse9AqrfoyAeafV97Qctv2066tAYZsbd6itF++51oNhLRKP6J/MuUsx4j8mt\r\nBULlvGjPEsp+KaMMkr+C/xcpAStCDYSfFpbBYriep76f7aauihkuLawiV24y\r\nqbNuDRRcU9xh5d1vAp/jz/BVPJENP5hHR3yM6EPXVnItWk530yW6SUP5+aDz\r\nouUEjNG1V1iqfg9QBYB6nAIAy8j2fstgyvKcTYqpU2FFOUpJpXHjvPruMEBc\r\nAiDyuMILb++nxq7h/3vooME0BXX2i98JM8k=\r\n=GIGd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"22642b6bc52df92f04091948eb7f5f6c499572a9","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.40","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.52_1663761127415_0.7508599549232946","host":"s3://npm-registry-packages"}},"0.3.53":{"name":"@akord/akord-js","version":"0.3.53","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.53","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e11a3c994c6047840de73879308424e985822b14","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.53.tgz","fileCount":53,"integrity":"sha512-miTrNAZFz5Twj37KrT27/lzB4Fia/uTKBQPYrW+PFUsasb9EEyy6vUn2sl3iSu2DEoaNpP5pN9rcFJnmmW8luA==","signatures":[{"sig":"MEUCIQDKchByc94WinWIrftoLW0oOOJzdVVM16P5hTEE+UaNsgIgAgQReC64arJry3CEo3/z18R/8D2B1tGFymZGDXQ+bt0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKwRdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBBQ/9EY3p8qm+046Op0ghvPmTDuqY1wcVJE/XOtxLgSivgONIWS68\r\n6tlaQ9AUkQ+xIr4CX0mLLd2AA63xeVWD7McNOEqKY5PMXN8IhCSwSW15sH4l\r\nyMt6v/A8DIzH89yF41G4DUfLm1zfhZnhTJT6pT3XFrHBtVFgjVEAS625azFM\r\nS0dK21hvcaAkwzJpGHCq7y9usppYuBifGz2cxc5dvrfzLu8uzdlLZl3lblPW\r\nxwqRzosQ7ikMnQf5eWhlyun7/hq82lhtE0ZxiDVgvmww/aVO3a+9yWyWfCIB\r\nwkT8t00X6Wom4RP6mPAS1DN2Tq+BkJUw68DmYu4ZHrFsTq7iipzHhGPhpLAh\r\n3SBnTaFMCIjygqq/d8AUUNPgLZQ9haMK1n83dcEsfQAWuC79Q0AC/2AEmDem\r\nhnutvvanqkvpWu0/8e0T58OK4qKSIynxTcmZpyVtrmpTlkJgUn2sJqSaKP6V\r\nwwU5baedz9T0iMQBx5reis/y1QoRNuf5DK7qtNlTGLpPv6BZaEtHKigVIw7a\r\nIJB2qGUpRdnIfHYVLrYciCAX/CClBkb3U2bS755v8WT0w4sizybbCyAN72Xu\r\n9iZLw8KSLmQwJ3Qd+rDpXIla7KvxHffPRaTrpTnlcqXUfcKXkEPd9BFVkmEx\r\nV3+UDT2TnSkMtXi+wVL7/nLHKVKyaI/KbiE=\r\n=dpRW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"a35841fdeeb7e92f86e7c1a98dcb52c41e98609b","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.53_1663763549396_0.40729929631832484","host":"s3://npm-registry-packages"}},"0.3.54":{"name":"@akord/akord-js","version":"0.3.54","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.54","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4a6ee9d864b2ed6d4581f37825800ae6a508a65e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.54.tgz","fileCount":53,"integrity":"sha512-iyaimkrpAebwGSwgF7DCOrthYdhdGSpItsAm0tAOprIdSAHlWJM2bBuAzjULJ/O0Nleegb9RjxLhyFr/81o+VQ==","signatures":[{"sig":"MEQCIEQSIl621wnX/b3XDv7rs+H6fEL5Csi/fnnW5sYxpW+SAiBT8Ibz31NQBlO16NNs2QjS0GliDh/7bPASLkuTFMGxGQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjK3B9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoqlg//Y8h026oGD/Mzg0lyfrH24s9aSyA/dRMJCbEtRR70Urf2adnv\r\nEiF5zJbEcSXGUs3xBboAnxV9wkG+1zvPL4fbWV4tg2zYkfY9722V22jQaCNQ\r\nBwfWL540HfaEg14y+bulcvi91y8hyXcSHqtmeUKGdUyRe74V3KMDS0nCt31R\r\nsqr1nucwpyIdzjV2PBOhQ/XMaCexsFJQc2GCEXlPyJ4k0DWtTcnduZBG+IH/\r\nSl84eJFsrpqW6YZs8m07cmbukDpJZQsAzCywTMg0a5QuOIDkm8X4CVxoWE5n\r\nYKqznxNRQ37YRwmA1N1zenwFITp50BBDLJ9vex3Fik33noDjeAFuvovbYodK\r\n488X0K4Kg87ytyke8YrCno0SReKQ4aX5o8wmqHCu8RTVILzH1teM/0n9uwiG\r\nxl9xVN6sPSrKXUry9tKEWTkE1xWODXobP5C64PPvyc8GWWg86Pl+D5iXLj/5\r\n5VzT/TYFsAOBKEFkuVXopf0dmGvlkqlp4FJs/oBuYcB8kJJp7wS27Z+aXcJX\r\nqQVL2V4BpB50LZS2qnlPYE/k41O3ZgVOyEQaQAIo9xYhYA/jjqaCt9BpZ0Hy\r\nkXmI29OUCZBc1BGHeVg8HBNznHBqUgeS8wRQA0raF2GsPP0vS6nz5XdHwkfc\r\nQIa3q7PxxA0VdItiwmfUx41aRjikK/fAGaw=\r\n=9Y8L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"a8fe6c55da172b098b7850a1caaf0c317a722fe9","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.54_1663791229726_0.8493265312917158","host":"s3://npm-registry-packages"}},"0.3.55":{"name":"@akord/akord-js","version":"0.3.55","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.55","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f17fc42fdf73cba21a8664159ad2141caedc4b95","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.55.tgz","fileCount":53,"integrity":"sha512-eo9opVTsCX+Qp8v8VWNVcAkSpleu1ghwvAPSLTwd4Ldm8mFLpyt+HT5iYMCI0ahudZ4OLt128dkBHQGk/JF0+g==","signatures":[{"sig":"MEQCIBOVK0sZpUtyRxw5M8chIxrt+GFmkvn3TCKD+8uhtdYjAiALY/NqQ5ZGghX17nti+XFxz56RJ6x40RWFoyKZ+X/sYQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLXRkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWuw/8DoPaWXs7XfLhu+OvzH29bRafx2pFXO5g8qAkJ9PaWWV0NZJZ\r\nP/RahoXc2pYqa/4jP3YiZpCRaGIy/RbE77pZGPjgqKJVHt/58ej8itRuzAkR\r\n/tyNmUzVo98VufLUYRrwozpvogJ9xvXVt6eWLwEGF+aZNkP1R/ImVzu+KjAG\r\nUU1ViHAcK2n/62uSjqpHe5ty9xtFgrxCu8e0HH2GCvbaT1Wkvv5i2qf2684K\r\nRJixwxV841y9OaC5x3swSbw3pldKq0MiOb9ER0sM2hhUmCzb/O+YyoudKyzA\r\nIlc4wl/IeF1ToOHV+htnjSpWmUubkzZBAVtdwnQgVXk4wke+/jb1FY9MQ6jH\r\nNoVI+bClTnJwfUgKUlAJ/lewxuPuJQ7UxRC1zNKXoi1esHMmh98AhFRtMI/7\r\nBeO2TLMWpC6PS+td82cD8vmErWVHQU7y/X7RGSCKS7mLESo0znHUZOj8umdT\r\nz8QJPcwqY63x02hjRkmjJkrQy9eRg2JD7Jcwhf/K99nHo0+0k9fjczDuZyZL\r\nFTOgdXf/rCHIfryZwEv64k4IezFWExjSOqU6b00N3+4MrQQsTHP4/LBNrmu9\r\nl4CC8CBFiMgJwZe8oT3eJnCx79N23VIl/WA272VKwWVjvIacUll1w2+TR7yy\r\n8Wy1vT3+3lwLHUElDaliOshWJyIfqLXTShw=\r\n=E+mE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"228d193dcb3b48273db751ce7a1fc26dc5abe582","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.55_1663923300126_0.33348299352064803","host":"s3://npm-registry-packages"}},"0.3.56":{"name":"@akord/akord-js","version":"0.3.56","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.56","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"86e5ab19d258e6b89352951f3f69262163952d56","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.56.tgz","fileCount":53,"integrity":"sha512-hGgnRC6udTTM1ufbQM1lI0YG635fu+SF6VtT40x/tT9LvywgNlJ2BXxTm2ucSnabTZ7za27xtne3qV4wN8xBTQ==","signatures":[{"sig":"MEUCIQDifh7FvGWvscMeo0ZpYLn1AN/gPlX5IqaY59Hbdr0RowIgU8zoWHxWkPwIoVkpOjFj4qlrt5xKFBgoDuc1cXHpAy0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLY+AACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmou6Q//W9kvBKKKEJfTH1UdysGo/sqUgc/t3LjVPg/aAnCQ8vhGDQUe\r\nq4yjxqZEXavABQ8YuVSlzskBEEqpCYXqLfp2nTEsnLtFde4yvFzUpZJ3x0DS\r\nNKexgGK36VNFdTJjtOMqEj/M/XJ48iOdIsIpfSODoTwGl1591Ni57kBorVoo\r\nOSFxJ46qnsDWbcA0HThGTRJcB+Wm7Xvv+IsCR4dVFqzYYZEKxhOVWInuKuQH\r\ncnRVcE3Oui7WCwSs4UKggP6h2zif7nDPRUE2AFTlA1x1UtYDL5ILmHCuNGbc\r\n+Tg1AHByENnt6T9KOt1X1cG/0n4NipCN1eCP7VRkWbb6jIcchPDii5tQa2P4\r\ngJWxPt4JaK5eTt5CmEci+zhUVAPlr9oBUc4w1u4gWaj9VPa8+fQAJvl7yxJp\r\nPSORqD5/noUY3++zAN2pRSW4CQ3ge1kAs394ruafjjooIo6/fnvcVX4GEWhs\r\nv5w6aVkk7ONAEyEFrZX3UlAD9RkxdzlJuRYmtqmnU4j50kmkYzGSRpRqER88\r\nMJcwfkyWsjJvkl5mpBaMCXM8wht7kbDAvYLnZGslwCdq590Q2TCPuJTE8RfG\r\n4m7W3izPkLypZBdteSvPeo1j2bs8tAsKtM79wdBwXiyBoDJ3PH0HDJpDJl6l\r\nk2+sMi/SFuYJZIcgzHCwXy5f8CKt1D2cR6s=\r\n=l4Fi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"03143eb9f7d26623b48e394c49ff11af60bd351a","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.56_1663930239826_0.6875964494650675","host":"s3://npm-registry-packages"}},"0.3.57":{"name":"@akord/akord-js","version":"0.3.57","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@0.3.57","maintainers":[{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d4924e7ec8390c4e8714fc22af05faf479f2c7f3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-0.3.57.tgz","fileCount":53,"integrity":"sha512-B9KjcMPnSPV8aJZlYzUA9Detik5bQ/MydN1xXR0sN0WNB1Kdzl7L3a8dfr3UePnMylAS/rIPS1R2O0+TjCt6pw==","signatures":[{"sig":"MEUCIQCry5H+rFPnfgx8xKrRDOes7c/8ExJkyoVpJqfI4c9o4AIgMMTBZRkjhVouBXF6ltx+lyDeyIA+pRDtE52AogK4d0w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMcgvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRCQ/8CJDqKCOfpUGEDlEuUrVHYdR2bGTg0DKrode1/wYL13+8WArW\r\nqDxRETWjb85KxoBWZp5BJHjbXtdF70c7LuRbYXO4M7WIGXupLpW/juld6GhZ\r\nLCverSo746fJwaRdVI//0tWde3nFpIHyXoUzEEClNg+RaZSm8H6mLvJ4eNs4\r\nEFxnhBpwPjVfMzQaa/e8v83P/kvj4FhZSf5tT8is0FvqyEizVDe+EzxVcOJp\r\n2QWBRxjwAKs8BXt4FbcXfgxv95pRIGcxYIMlm1yj3xEZoAmSnilyzSQ1oqVt\r\n1r3LCn9rJY2Ls2koqWYYXgn1wygG4Hh++UEahoCic0vLpSZWEzHX0ulDFJen\r\n6B/GsAcRjnQWlnwUkRi4DX+194RQGSK/aZrUUVuwNPn9G3+j5rP0FMMLBIYp\r\nQGKfjnfpzbfQqwu13suKl3CT33szkAB4rAsh3P0WU/ZN1AcIiivocABKXILo\r\nKf86hj4NORo2dlssGml0eXiI9qupaQz3gyjF9XiCUY7TUZxQP6iarCW5zEw1\r\nfWiaXX/m0GV3G9KnXlRKVSghovwMCF4UISLTIYzfNuXGi0zYd+fNQUOdd5uf\r\n0SPNd1e/ztVYsiawXy8H834St9M3jWIFVop15HgqRpiE/Rka7Lf4R0ENznfw\r\nCa5+anLxqC3r8CbyXkDP3GVake9dyJNmaKI=\r\n=+iM7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"a7c850432d7fd79c8d0fea7ee2b0723293d199ee","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"katala","email":"alexey.katalkin@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_0.3.57_1664206895608_0.6009960262456238","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@akord/akord-js","version":"1.0.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.0.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6a55a3cbe1c985f974344a1645261458295bf880","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.0.1.tgz","fileCount":55,"integrity":"sha512-wd1lZco45ev2ma66A9diocB40sxM8qWp3zpWuFFxKY9cfKD7Z5q/MtUnOeYGwg7HcXlsvFecWbaFACjW656DaQ==","signatures":[{"sig":"MEYCIQDcdepS/WYhvyUWVC/gRq+WxlC1E8acbPGncNC6gjkjBAIhAIeXd1vGdY7Um2YwaWf4cYCFScKYilIGwTHnbH4vmjPl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMyA3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqyww/+M+sgq3GNsrE+420fhHMxdmxJuTYffiwcZjrIkQEGzKCrwOM+\r\noXFygpTAtB/HWsVLADZiY7jNBaqCUW3lE8Cy3LjInI/Ao3y39Dpp4l1VKJsh\r\nGOLBDrLDE6VT1+kcqbkb6gyOBkcaxSwrLenGl5YiB3wk67yrHVnZPEWZr2eA\r\nkAI7MbPnxI7sS89znbZXLokFwVgQ9imIH3f2LsVLCQARtqJGF8cQAsBPYcA7\r\n11YZhQWoS9gL9m2qA5vCEM+TKzDqFFmtmWKdZAy18VHFdVGcl4fLC+bYD0V1\r\n6/GYgY7kyPl0nmPOpqs8Uog9yb5ItC00tZlUDKbp9plt4CsxPMLU0gEiAcTN\r\nJtPa0DPxjwACvaZC11ov4O/KcBVmjdkf9Jj0stjWPRaWCgD520ejXkycJCmZ\r\nUxi54N0gN4PLS7YbtWUJybgyd2B3TEgKhj48TGp+/8KUvvkv7tFG2oZe+SL1\r\nA6H3zkdEQRSexypyeyIpAf+mBwBCx+0TAdp/GTYp4XbgfAOS2vIZnWrVL5ot\r\nFRAwE6IVE+s+UUbIppIvgqsuHOeItk+qU7hQVC4t/MXco05oM7RGDRCp2kaL\r\nduzL78hEtI8R+sEb/h4dOQKucCZa4JXgrlL8mlzCpXAJK8213nzbr6iO9ikz\r\n4Qwpvp/AkIHGFtniFR3AB8G7qXH70QH7pqs=\r\n=9MXr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"9365e6d1239feab692fff210e99a8b7e3e00e010","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.0.1_1664294967411_0.6637340528997941","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@akord/akord-js","version":"1.0.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.0.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"600de654411f7c35020a04042dcedf56ae5bca02","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.0.2.tgz","fileCount":65,"integrity":"sha512-tJp3pXkeMXBKGxluz37KslWVfYXWe8TCvIESUbPSzQyZoTCpw0f3X+PTYVXQuQo+rppEYseg1yCe+txz/pEisw==","signatures":[{"sig":"MEQCIDtkxzC/1TOgaGmz94oVKWWzOBWnDwMVVXGEvMkr2RN2AiAwhoDCXHQiRAmyiftNB6lQYhvHRjFv/6jly1Kn7JTDzA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":250340,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNWzLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoemxAAouEU8sr20/FTcP6u/9YgYQb8ARzmi/l6Gz5hL+kPz8zqTveF\r\nD5SoJvR2xkvbYA5nFQIA3l4C5fUJ25ezA+63AzipBLmv/rzM33irwRClRpyA\r\nQq5eRB/7Js0GfyKS9894i54Sa34s/5pl8BPDy7vrBdIwirCevmm7XnzP7fMN\r\nuV73OFpE0pWDMZnhDFGYzTU9PZesRYmXGIy6NS6ZbFp7kmDWD0fUvrRciDnD\r\ncIftjAO5OI+E7msFYYHuF6FSS0Y1O0YjLuFp7HwJ230yd6MdKQUjWHs7KN30\r\n5wJC5RGVmyB6s3HoAqEGAkjypkI68GdMHTdqXXpFMPSUQ0RwfpseUEtB3ImB\r\nNpnNw3DURRWa5SLBl3EvAXz0+R+74mODhifs0ZP6rakHK5861EtGDFgxeO+u\r\nmmt/S6mOmBC7QlRbkuopKL6Ozr67e1kYt/9sHhWc2NK3A18DsZqAJ5zjvR6g\r\nxTopV0z6U3NseOtXrcYBSn3nwIwDZ7kYvyK2WsO+/cOoEc7fK1Lj6O9U/OYd\r\nla0cc0zeGUAGhGcQWcXQx9ccG6tFlZ5Io2USneHn+ltcilptHQbdkQHPf/tR\r\n0ehsMt6pQSqsEkEcdIFqH57qP30f2TbsBvk9g5RsVz4fT8Ct0PzzcKU+G5Ja\r\n2LySDLs1g9l3xP8YzVxCvk8GqOiKYLslYKs=\r\n=0Wiq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"1e594f4afeb4135ad82295146fdbc95fd1d33353","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.0.2_1664445643087_0.566798746370784","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@akord/akord-js","version":"1.0.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.0.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6df2db8106f61b41e3013f0021bf1b94d00c6741","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.0.3.tgz","fileCount":67,"integrity":"sha512-DmGHBD9p8BLTjokEsue9/h7s+hksYpDgS/yhAus8ln/lmWiKBb7DEOWgwkQ+8B/6GmSUC7JFwm7zSwDh0VvA8A==","signatures":[{"sig":"MEYCIQCHXBlJirRUtmwFIIe2c3KMsEr1ca8DhT+MSooWuBXVUwIhALRNv9lYKZWLCJAdnRfY67K1tisEfLAuSmSXI//dovCb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNYkrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBcA//TdnlOCcWKPLjhROumFkWx6WckdW+GTK35b9h2p4T7scLNAum\r\nhGSdOoRT+7SAxVct4LxzjlIv0pClnE/68WkWkYr4OGV3R/UrgvYC0JtHGYJc\r\n0jMO02KjLV0/KROAsDQygfnOvsRT7FC5CGUbmg+7NSOdSbWX+sDcapGU+vaB\r\nWObYPBibSSWTjmtkV8MUJXG3rW3DQOObMRF+aFWJirxAh5CVnCx1y7zgHP3P\r\nnnk56vqqbmQrl9pSCtTTftYLWRfzKi9gMYR9Wu3v3K+fKS0cMHp5xu5pLEEw\r\nVhDb9nf74xZoOlGopjPeBMB4a4Ui2fjPizy+wYxgcMcJjjvg574TLD638wiI\r\ntXZ4NpzDS7L8NSu7U8bXDoZWYnPMzbB7GHMjnMCax4nXpOSyDPNaxgX5aAbN\r\nsEh3NmkVviit3PqTsT3U6gAxCExxuKTQ9mEjNlDNRgIJLkmRbzpX89vKwdjR\r\nj0IBa2hjVNsuGlmwAsMbaKnuS7Rkf6e9Kp0L+fTWWdk0FIGX8ELKaXTgst0J\r\nT6Kdw+8z3XayLHcKaRvK+9l0tN1GEyU06qVxclSxJ22sOmGtGi7DaR+lrnHJ\r\npVcOGxtcbLdzCXPWJZ0OQhbyqDyMlE4w8ErzEDmN0MfkN3IfnRAYA8IJQl/B\r\nuDmFB5QReJgBA6oNjkrodBVq/CLTwxNHPNo=\r\n=WBDo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"33e237610b79c75551012b118a6095b932b16e7a","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.0.3_1664452907355_0.03236289609512011","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@akord/akord-js","version":"1.0.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.0.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9c0943a11cdcb34e2c0255584cd623abd813f491","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.0.4.tgz","fileCount":67,"integrity":"sha512-XaI/8A7poQSfer1XQhiKlpWjv4tGuXEmqnS5NsAl1P0iOlcYiHjdq5S3r2Nt5VlS6b3VJcqqt13BGVfrHk8y4w==","signatures":[{"sig":"MEQCIAiJt0DqyXhh7CtJik+uOSGta6uZNlvXp3BX1W86j/KyAiBpSvQFRwWAnYdSlcQfRyUI42yRmo/FPldVwthoBh2JQQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNbUXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmohkA//TSZjiHIGG9E0W2TSvxgqEO494vntO0DC63FMjJN65fhtanDg\r\nG2Ed/Im3PVaQ3vZum5/ovtb7aCgWy90qAO3i0SHyQ1+R5wjh7dxtEgKD5NLa\r\nZMCqpy9FI0UAHg7Vi1nLWVl5z2uqACblt1Dc2fbHYAZnrpKhTexMksSEdW+A\r\nK0WcQunBMMB4yqqu1820Ml4csVskv6cKzD14RHVwgUrn0D82MFHmX7mbJyL3\r\nSLTRDMA50ZsRtmCFE6U/yzgV6nMLFnk22UTtFg4ggablaBRiHcjzi1VbONbB\r\ncRwa6+iekmnn1XWLc3YLS4ddYFT45Bn819oDg+yjBSAPNNXpVg7dHv5U4D7V\r\nZjyUWOpo7i4PMNDkt3fP55vi2DPcrNFUUby5iJUN2zpXH3zjdlGDKKqbH4aC\r\nJPOdnlMknW40R2A/GEe25pLbfwJqo52r0zPNaGAaBksa2lqTxh+2NenvxcDd\r\n1IHt7JYxOJEUqJIbC5tjVBu7xKTgG7b8ZJRZQXNUffKe4i6RiGo7wtmDREQ7\r\ndaDRP6zc8gwsqnduSc/7x6CJKu3WkZ/jdtNFxw3fkV9M1DxykmQJTAt2oOMq\r\ncHfOnB6ipWLKB2rGyZQbb+ZKHUcLhZohksUQYFI2/jUTKACIpiGQfUKQl3xJ\r\n9JFB1phZC58nsRcYyg4wXh6j5ocdEripneU=\r\n=Qnq9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"13a2fabc0535de17e977bc1cfce3ca604f9f60d6","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.0.4_1664464151014_0.28896439040623245","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@akord/akord-js","version":"1.0.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.0.5","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"efb63802c460d6084ba4b0a2c6145fb361936de2","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.0.5.tgz","fileCount":67,"integrity":"sha512-2beCg6ey7W37Shl8wdynuVybfzp6Y4jfS2wQDn7+pDApCr7YdH0NfuxkeHNx07wI9XC2QHq+urbzaA2Pb20nQA==","signatures":[{"sig":"MEYCIQDijONI8ORiL7FpQwYMhjTW+Fm+2DOohHCfVpHHs/mvegIhAKb5Vt7XN+IG/8noG+eqS8Y9UWZt2Alrq/Pf/EjmyO/0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNbWTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRaA/8CEjbjTpLh2z9670jRlgAD9NnreOacLrMn36qeVtWihQjLNxA\r\nxb0IasdqYnkG+VNkS77ArNssOHZSP+g2kZJi9AYZmbiSLAu+6ATTJG+xDlT6\r\nkKIPDcjl4PwYx6S9NgSIVD7I6nwfc/YN/YQqHMeIJkAIXljcs5RkMCwhKn/y\r\nbHNDdMudABXlZQvz7L3FmBQRqGPg9w+I6DYg8aSLf1lx2nrjX8ISlKCJDduk\r\nQu7NR20oRxz6+ZxZNwBHFqrPUNET49/Qps+UAeiIdEKGadf59MuQbFEfsmWw\r\nk5aSvO9tRZEax4Vi8pYaEOHMlF+iHF5AM+oHr7HWFAlzgI5fYnQr/Mdybbh5\r\nZ4o+ekVEdKaHyZfRV5qR8UZOtyBa43O5krN/9F9Fl7NAakzaKB1Q2xfq09HG\r\nZSaY0Ka3pIYr72Gs2tZxG0xFZzqMiU8jvWGDL3zY6tZY+Yi51m7StgAQXxvE\r\nMqkeLdDbNXFcd/In1NV3LI/1GztykD8HvopooKqma/gjdtch9GQesexFkH8R\r\nbE4DPAP6MpuyYVAGv5PbC2ZrFig7DYjzlE13fNBTNQh2++1YtPuXHFBD7vl0\r\nAhYfKmXndLVV6/hiLIlxFpkZyyGb4ppfUScS5zQX5mZ2bmlTQzKxth/B1RpV\r\nzs9gEO0C01xoO/9iwergrM94Uw2y63Zwm70=\r\n=oqCu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"1ef49bd59fc0112b37a232e02bd28352752597af","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.0.5_1664464275170_0.7115936686340294","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"@akord/akord-js","version":"1.0.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.0.6","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"cd1a49e3be3992c1c7743df1324b5eeff87cd653","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.0.6.tgz","fileCount":67,"integrity":"sha512-hZ/QTSGLWLUtVV4Upt8WpUmZXYBC7M7w7xsT1SZaP+qbteMS+igQCaRakb930CU7usOhJNaGRu9E6i5bhvFHvw==","signatures":[{"sig":"MEQCICpaPGjeFrZ7WnYBU+MPuGZT7fi+78kzX8paOFi4TUQPAiBFp39uLuh7Q7bdcedXPMnbK21KG1JLxerB/Arg6T7TKw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNqJ5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpIAQ/8DfeJ8ccBjPV+lNrtEDiEw5/BRxGBHsA44X6SjzRQTATceId3\r\nS1eY+2fN+fPezbgdgd/CKXzm0bXPU6nBeV9jJgynSM3ACaaBPyLj0Yy7NKt0\r\nJtsM22q+bvNiEY6jE58c7VVjgmW1/syQD14keLsTbFglA8PAbBoeUJtM7bz4\r\nN26XqysuDvbQgGfqEkjD+Sw72g4ZcHpgkqBoDeMXmZa75czhzxK0BGbRLe5v\r\n8uEvGn8JwKilMywtz0k0a8Wkl9DfMsPdaBcXlmBhfcLVhG9a5+yJGriomUxG\r\nSU6xOnYUf4mSBU4GlHs7hst5h5aUGnapeaE3D7NgJwHkpTSGeuwffXBCc47R\r\n12qmwFQsVRQpMS3ji9Yq26aXL2TCUP4Ad/T+rzrJWn+2FtFJ/S7ofDDO4fQn\r\nv2UxnQIMBbxChIavyEPXAnuwPMrSVt4ZQOIpnZsmXoT4M8OxN90A3kHHlHa2\r\n8nR9SLpv00p5GfzxO6zOtANENPPMKV+mmIFofbZofzW5S1URqy58o+JhtI1Q\r\nSUuSeFzQegFoXg8cCVYjj0totYY5qD3tcpMIpif384ZL5d9bCULkTa290AkF\r\nP4V6PGC/COrDdgjxRjVfeVoyvTW8dRF9LyKFa0nG4Wp2fgXQSM+vR2bMM8/c\r\nWANjt4MW8RjSH8eI05bEYXcToqafadIUOtA=\r\n=xOQr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"d6a078016fde66314bc98735e7b86ab3ed9be218","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.0.6_1664524921199_0.456083470961385","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@akord/akord-js","version":"1.1.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.1.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a4bf30e2b2c23592bd1c5ee95bc7276e1113a529","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.1.0.tgz","fileCount":73,"integrity":"sha512-jBY6r3NGAmYwtSKlQ/UoOo/xRRqVxDcFSEgA8kviPN4bLpdcX7QdkDbXNjkixpm7b0UFoHvax/J/uZ9wPzo79Q==","signatures":[{"sig":"MEQCICjY5bGgT54NfwG0efWchHTswbjPR8RBhb2UvoJuzr0LAiAZ3RWa8bjPDOOn67CaBHHNtcjJXR82vxb85HkiBxMYZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNqPkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgQw//S46W9za7jXXAlL0ZE289wR/rXRcOsrjtbxKz+r6J3kETVWbs\r\nYDmZEXMvlJ7wKb5VInbZNtvtWrGdEfMGoNpZxvwzhSKRXxAsNXmoT7qFsxQo\r\n2X/F85tKfkjqxYiEvM1EvwGQScbBEqyMHc5TNujxBM0ufSgvZxvOWcUBlqkn\r\n8xJna9ZOboyx9Gjo6KreCOnrosefaOV0FsFcVbFCZjmQdW23EZozvw42yGwO\r\nnffOfcOD0DpOFlkbc8OIARlRjymr5SCs1kX50e4k5y93zdfZoXSXb1LIzG6N\r\n/MW/99PqUeJ8VVyk9drSuNldhABGY0UdWQGASyYjTXbdkveObyX6qdfp6jh3\r\nj9SxHQ+6Jmt+oYBxe7VOIFaqM3/mzizsckcPnd0fYJcDPiFQWOYwwbZdB/FF\r\n/4Ihprthe1vLZYJW3NnNbMZIC9YE0gpu/BAZgvhYdCaWP5iCtiWEGQj7mZ0Y\r\nw8kBrnmKoe+X4Ak+y0QJTbRe06VD+wa2NXe6CjdSLRJhGqhTAfaATMw4dhuI\r\nKO2qQ+Xi4CWnrPWVPKsGofIDjJCW4p7zheuojIvWmVrzCGiLQWdDcnBM1VHf\r\nxuhi7hvkx3mXRtxpzBg/Y2oFXT/88i4IBK+usSd0ama+VbtFgixc41+IMgyS\r\nhdRxtL8lxe0qiN5pZ/Pp8sbfblTvmc8nIZY=\r\n=84Ms\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"57a5e0177b80131a573d3df502b964438f551d4e","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","ts-cacheable":"^1.0.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.1.0_1664525284360_0.14487315973700876","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@akord/akord-js","version":"1.1.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.1.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d060d65e9808ddd4a9f2cca0eb5f6a5d361218e1","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.1.1.tgz","fileCount":73,"integrity":"sha512-Y3dRxWscauVh3MWz1YcbDg9LM6Db4gIvxPtW5Lp7AMwlawDvbE20uA4YmHOJCYNS09tG1Hwu+Mdy4igz4NPYNg==","signatures":[{"sig":"MEUCIQCCMbIs4xsiLYlntnfY/fs+k2vJylnSMfhzmJz+8ArRrgIgXD2g58V/VDMTi7hEkbyqqKYVd/rATGd3dWhhdkLGQ0o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNuTVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2XhAAixZwWl/PeTd8/4z6psD3TvOzCh44y3LCr+cyxmQJJmig70I2\r\nXDhzBWB/1k2IX+NHjk0p1aTOv+H1iuY/WqxKYEkTpMbOcJ7RhM8Ekw1tkQ9/\r\n8Q3Z5uQ9953oyu/4NZEZa25pfeZsYKaFeHg7mHNUE8jytSH2mzA4OZv9SS4A\r\nqniADTJcYtLmAF7Rb/hbNDyhxrHWrqrgT1cDYjCXFeQEB3lMVTq2brzILEcE\r\nxlZYGfe9fcswhxZDS7592eRCZFpHq6GXdZSvzWLJKXvkkPW32IeI8wqSmN67\r\nBETUaANvNyZr+hOIAr9oTNYtsKBehcnRDgdUbceTwMfU9ADge5kSklxkKJNg\r\n/mLBNfGfpKROgZ5XwA2UqQ6NrM6cAy9q+mdhj63ZGaZWq2cwPnGDK5lPNvVL\r\nzoXRiTKbcBVbIboeqfcGCJ93nf2anlfMSNQDBWZ++FYlNQRsPQEldOG14Nea\r\nX+88S1wkIKcaj4bhPeEPYXoydK9jUEhNMUciOIh0aMYCJvLCHyaUvMU8LiDi\r\nl853inuu3wt+d0L/68Us4aC03KtuWDSnG2t85s1fJz90MUwetr6Ugu+wAVuV\r\no1i64w/OcmMjV4vbjS/UYc73jZYVUTYMpT28cUn9QK8wtyJe/2Dz4XHUqWO4\r\n0fYXgcuz1S8YIMlmCIeuRL/9M3vCS/dgN94=\r\n=iZG6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"857391c80aac8c3540e8266aee447833d7f25280","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","ts-cacheable":"^1.0.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.1.1_1664541909624_0.4485110570814552","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@akord/akord-js","version":"1.1.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.1.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a790584b7bf2eabc53e20710ab50d2ba915a5fa8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.1.2.tgz","fileCount":73,"integrity":"sha512-CXjM9n4ZbkUoYvlcmTkX8PLsVnXhiG15yy83rEQoq0XktWtwwu5Pw05Vf08LV0Y6ZUcECrF6LWaAPuGCjMpqbg==","signatures":[{"sig":"MEQCIESflJE+pB5LzmYCVUk3amb3O0WtIf1hSL5Ig64mKS3bAiBHbEBLX/3GbpquUf/1lRHwHj5o9VPOnSkLAt3E7Nyoog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259249,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNxcJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqcfg/8DgMrGPWeS7d+kRobJw5pYw1tjmWCemM+49bMlKM3yI3G6FRs\r\nWPR+v2ntF60eGWWEZsMWvtwj9LFkbAaXTmwbrOxPiEVr6EfXOM3UPs2IsjN5\r\ng1nfbs4ro1tCz14JP7oY3n0LF+Z4PtyoaAICostz24JvFrnvJOTLooce/4i9\r\nzj1v/1oXluQddtg3OOFbJEuZReeUsEZhyzLncN6Culh3qRWZa5PWUV8yqbjR\r\n6g29W5cpeqQkDHkxMzN5Y7ijCaGVrR1TNUrgwidvW6QNkcWX0/whwmn4Xh2t\r\n4hqYt4k8TggFO7UUZo9z1BTZyXreIieOpm83dxXNfmnes1WHWino2WpfSNIv\r\np31RdNrgyWr/cQiN73PSlAvsu7StaR3XTzDz3iA8RDyEcz2Dt2R2pofG0n8A\r\nwRahaOCIyrsBysW0tH8EGxLkOAQRHcz/7bNi4VdcBns/Etfa7ry/zvbQkDUO\r\newg5pudH3MryBOmdyyeXoO35maYePLJJXUuncDW/UVypi1Qn19kTsHIAJG8X\r\nD4a2jdNvVjyBDPQFfYgERROBZB4qGMdoM6txYohrCUMLy6zYxS26yBbv35X9\r\nFOrT4l4OobK9hEtNnGo1SbMRQk6kvkSDJPbb3venijBnFaxM6hlkrFo4QMhS\r\n+nNeZC8r1MuzhQ9/Zeq7dqppUdmbVr3Tv9s=\r\n=YK4S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"1057d590d3b283ceed83220914036979fef58e26","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","ts-cacheable":"^1.0.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.1.2_1664554760901_0.2199118763343244","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@akord/akord-js","version":"1.2.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.2.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bb4e3878b5d59eaaf436f251885bb8ec0a60628b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.2.0.tgz","fileCount":73,"integrity":"sha512-mQ3TIKwohFrU3QuGWXAKf/3lxpyD2uSr7EFH7A2GqcjA4/755yjrdZ3kir3uWAUonbUW6Bgn1pQQxosvzPkHjg==","signatures":[{"sig":"MEUCIE9VT79lxjCY0dKHx2xNofG2+TIBJjOWtQoc006VCPeiAiEA46SOE2Cua9XbW/5B91z0ZmPe0LIP2I1TnRJ7hhdbeKs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259263,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOEasACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmopfA//YzIJRiSnPKNti860Qk3jvmNR0c1P7Sthef2NUVsc9tuTQl0o\r\nQJd4/OlM0CNILtkG/UJLIqmVFKFg2daWk7f9aOX402RfHigG8LTC0yDl63et\r\nYr5JEwEfRqw6qJNA3bhcKB23Hd8dYgto+LD/vgb9eiUOXduGxJLfU3luf67F\r\nbYuacVNrUeg+OcQG7Q6avNpW/LHmq9wlq9fXQaa9JVR9nvYhh+h9Aq8hsgAK\r\nfMGRsJVWO6IlPGdLexeD5X61PxudidvmLnFgzEPdObpSvH11e/Sw44Xc70t/\r\nHUIpYYjO+4w4xBVJs6ohLWo3cbfCfxoodXK0W7jqBj7iJ0cvK5V8vL1NJbM+\r\nE4TfZI4WpIEPWMvjpbR85vMkDwDnmRsyg384UVfj4P/sjyfOtaOZ+ab53oYt\r\nYmQs4QuIn/2HOV6MsISgAiUP6Eb4hnScq/7zi6MlzzjG88+Fz43QsaQwWPGN\r\n8Qgqw54st3286oNNzrm0MAfECC9v11NfuCPe9AGXD5OBSjbg2q95fJ554TJF\r\niGkdzOs1LbRC94zPWEnLGeyNqnoJgSXFgjOqQYNkIySe9on/6tMfihPvPL3z\r\nZx6w9gUFc7+6km1oSSmeh5aVjbdNU6wFa4wVce3MJrxVnkg9ViNuWHlwhFhq\r\nQxJD1wO4a1y9zixM/RKsU9SEDPNtR4zSj5Y=\r\n=JeES\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"169ee4479c6f39d01e3a314ada69df054e37d120","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","ts-cacheable":"^1.0.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.2.0_1664632491964_0.08296136732412673","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"@akord/akord-js","version":"1.2.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.2.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"7bbd75fd60e30c0eb9793a0d7095af626e9e1d3c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.2.1.tgz","fileCount":86,"integrity":"sha512-S1eVre3npFQiOMrkKGrwNEWZnqkhM1rtMBuvc5fDhOsTFbafIV8KM9oqCh0V7LCTxZCBzEteM8L6UAPsFW+apg==","signatures":[{"sig":"MEUCIA1Jtq3bCWAV1ApJuYzIf1vkCLO4wkZhNdCTKdCjhdHHAiEAlVa3ASOmpD/rsAqPL/hlR7v0UfghBP6+pYqST+97eYE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOglPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLcQ//Z0OGOAbO1cVJdt/iVeF+ql/2XmpImI/f1+t5pouCz5xK2QTw\r\nUwehvBcmEzpkHURvdfrfRMSr8VMUI/h+oKMVjuARHySOoOWJ5ptFviY+Qiw/\r\nJtpbG0pw9ni+fO1xpCRNdh1Nj+c9F96ZG8wNzM3IBCOdUwRg8hMSHU4fIXUR\r\nDtayOuka8XSmDDs5c1OH0LxVRkygAzO6eOYTK92+Tfc+r/2OC6IkjF5vlWHn\r\nWcaGhuwTms4QtIq3yDSgmKDfcYGsAbGTZJxzSnl9It3yLzMCqOOc4ZBzBbeX\r\nAK9xRVd6gyx1CrHMBON4pWBKiR3mSJcIdUm5hJdno2TrjA2R+7tPQTsyWSrs\r\n4RSZ2+ku3znVDD/UADy+8n2b/ccKWcdkySVRFc6u8DiUe4KUVtpp/hOCMbqV\r\nAY2zFSyAE168WayXe0HOF1MCW+U2osRNU4t1cvAbxgRYrBJbDIeiCHsVWUpr\r\n+zFKg0CxngVRd19Jd54vRHgHwIid0p5wgBnnuMqkF1MtTlWyF7XnYCgOJGZb\r\nNl3Wk7tC0vqHnM3CCC2l/IGRhnyz/lYp4ta0T33ijImlAkuRNLVVK9UtScuY\r\naGgVCIA+JvVXSUfN7z0QrgLWUkxg8RkhL5CxjvNwUu0kiPIl27tPh/ROqT3x\r\ngkF/IocAW5OjS1iHtCcKMaevCnHdkCqljGk=\r\n=0e8B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.2.1_1664747855537_0.9334390522361715","host":"s3://npm-registry-packages"}},"1.2.2":{"name":"@akord/akord-js","version":"1.2.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.2.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a22cfa8d32820f8747af901576623d1d41f99139","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.2.2.tgz","fileCount":86,"integrity":"sha512-S9inamH7FJgL27EFaLB/x/rdvsCtzmkm9dg3X+jatM+4b0cpWeYX09hpMfRH9djhQOrjHPgUbWDXUvxZYatWKg==","signatures":[{"sig":"MEQCIAM9rd28LIxJ3uebkpHp45TwM8i3trUFP23RyigjNxG5AiBvT8hcfCWJNHM1hGImKJfOaegUX9hA2iH3cjGtvjBTZg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260061,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOgw+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJXw/+IhVUlmVXeTs6O9xH8JFYXUAu93CxGnEnPx/8+ArmoZs5kLeH\r\n5KBK6Yqq63Ld4o9GuVKOMc65mdz4KF0mQlMlCoY7K86K0hEu+Yi/c54lnkdx\r\nF/Ab8ftGmDILlZjxaEv4qz8JjTFOLnM3yG7M58gydpLYC3Z+Ut/SU+VsrYcA\r\ndlPZ8f6YB+hFiDaqxcqbI6/TNMsyUoMW0tXZsn9N0rPAc7GQ86dEfWirhKZI\r\nxb7uRsqEODYPfP/NrrYrzU6PcU4ymrUTgS38CeuwSXF3j2B5RWsC7L0b+NSj\r\nqlXfWBDlpebs6I+CJc7XR6g+um6lskl1bm2/uLzrpNP4OOnbsL60efRJdOkN\r\nbFcD0ncNuC55AYYPH+A9bMgSd+pYyyyeCH7l2xc/jBvOA9Nfeo1UkoK1PkIv\r\nRPDw7rVfiUsu46E/O/mL6oi9Tk6ZW8cUytGedkyRfpRwfemxjRrVP3gYiwck\r\nhzHQHkFuty3TJ7skYXsyQk61RoUhmIOlDWsYXu6cnt4iiIttU8b8+/QW3NGn\r\n+H/hvKKfzPmhaECAMEX44k1rOMpjRLOdFM6Ng/lMN559ek/ovEFnSyPcknLN\r\ncYvp5i9L6Qgfvwjnp1PF2v7DbXLwiLrdO6ON+XQtDWaPV/tlbqEAzaA+1nrP\r\noPrvWamy0KrmlhpNGtYpEQ/RejMKxTi26Jk=\r\n=dJqI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.2.2_1664748606392_0.05246754466039372","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@akord/akord-js","version":"1.3.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.3.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c6703cc87f98778c53972d0b68d924144d6ac15f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.3.0.tgz","fileCount":75,"integrity":"sha512-TI9Bpnk6xYDwevvahFYpP5AiYKaWUYNEJ4zz11O4Mnzphsby2VtkooMS1q+gv2VfwCMi6pDMvJVZXZUTk5cawQ==","signatures":[{"sig":"MEUCIB2Ky1MDWBzh+p+ISAENcM2XlSU6TPTrLiEyzRuatPTdAiEA5YjaBOvMs9ORglet4fm+U07nlWvHJS9kKFWM0PxvDP4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":262187,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOriJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqbRQ//bLQ26WpCaVwXgPwbcdZ+XeZxy/8ycWQwsNIP4Lalpt9+CBuk\r\nFaUGqbkgwoW1WfARlE0xh4Qp7pOmfuKbFmMtARfSD7pbx9SC057eDb6Y8a2D\r\nIlyopf8+y+t8tEqWPQQpNIJcpRAzAhdXntCkfMZgMoeNmdCpnCYgNGOtyTYl\r\nbq9NIGQO9b8r+W75+Tp9+A2TDbiHoPg725u7Eehoec4wkKclW4QuRLvccPWW\r\n/bOzt5J9FqNV+0qwq9nBHTbs/zZ1ptUdIUuaqccyzfQfij3cq7EA4JwTF+uR\r\nz/WEzBPM0QUHh2Xuhq2qSavI8EQoCffTRC8pqkp8WkHQ+XnBzff2NykNtToD\r\nM2o6q8JJz+U0ofFTlvtSLzX4QgdNrYEcJaDVk1UHv3fPAfmMYqiTIrIBqPhA\r\nwprY2pFogwhVF8h95tIZ7b+v10p6K8ulzVlJT6DPytevsXDZ7jtDxab8Y812\r\nVyBridaGq+mVQFEyXKf9p9N9Rd5tZ5BTLedXTb2J+jFHiFcg8wVJ1ghdB4Ku\r\nUOTK0csJkeb8t2YaU3dEwuCWFdSBjeLeSO0ruGNYIyELscj2jG9wxFV1irG3\r\nsAZ/t8Ckx7q4w5EcqkFeSJeY604arkamOeZzHk2teSWvfgkyyZ9T9qglGx3o\r\nW/Do0Wrw14HPYMAW7tIJzWLymq/ZWP8yO2g=\r\n=0nzh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"8667b15b96b795ae69a3e7ea15fa130c92152a39","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","ts-cacheable":"^1.0.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.3.0_1664792713458_0.9505673758897737","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"@akord/akord-js","version":"1.3.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.3.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"8e2b9abbe28b51c1f4ff0463bfc278d506735a97","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.3.1.tgz","fileCount":88,"integrity":"sha512-iR/TbtHaOelMeXZnSFrVqJ+JIK5gWCGDan6v13Crvf1szyVRrsXke/wzMtDNT3SLigjKxIczHkp56XUqwzDTDw==","signatures":[{"sig":"MEQCIBYK2TtoMd7EOOh0ZO9pFUM8RwT+MCYJQaYCI/Rc8geDAiAozpGMRL/IQGBzWOyb6v6/pONVG8aH+NDPHlle/gZuaw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjO+42ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7BQ//fAhzMYacse7OSl6elf47QASkdvC6bASUhD4msER+o9TSiC20\r\nh83puRftfQ1JOwMtHVquwcChZ+aFjWGC8h3pmDNP1behyoQ1FdbdqXw2wAV5\r\nK4ol98I1g6LvNz0/a+mqJKZe9Ej8qo2b2WJ5LqVZI7uKvA+mZm4inLDx3TDn\r\nHy4zfyIws5aQXsqdCnPIZBAs10vgwOZSOPv8M1Mvhw3IA/iL1ZWeAOmE2huA\r\neogP97cy/bmNWGNRj40wG7FojLWQ1gCQyA3ShU83C54XXjh6qyXD5jitAz6c\r\ncdGSHdoGb5fpKQRbYze/fcWO98CFFVD6LlQARkcOEBFyaZkxFPRjCzYnb5xZ\r\nd+2yYqul9N4dir/aklstarJOcbDu1oiYODKGbA+I4GSiRaf/cR4EY0ZzSr88\r\n1RQbmnIv6vMFRB7YKpqs6c/QRBbPHyko1ApQuBpTztD6yrvnbqgySUiHqxXD\r\nuJ1/jANbJ/Y6PgfHAmu0UHr84P+2+KZ5C03hp1lR7cS8Jd/ZraYEVZ+DvmIO\r\nICb7MnFEzRN19lKjGpPjdbrtw7eXyX7PARqBaQKtf6FI44ABzoE95Y7ukyzv\r\nl7An5u4RZYdy3L97QZRu5tv4Qa+R5n4R4IqWSG87gK+cLcqbbae3WvC19Djr\r\nDWLjQUJalWCoR8s6dC7xrS4tt5S/E0XA3/k=\r\n=TMC9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.3.1_1664871990612_0.9112611843320071","host":"s3://npm-registry-packages"}},"1.3.2":{"name":"@akord/akord-js","version":"1.3.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.3.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b797faa868e0658dffff2a73718929c331635660","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.3.2.tgz","fileCount":75,"integrity":"sha512-UbEg79TcfkETlbR1RE7wnEKdFofiZbuALDOuErIv4oCjJBEhY3fR4rVsgqBBZEQ2yY6fGe9dqb1GGpbL+WlxJA==","signatures":[{"sig":"MEQCIE8j6KpbVJZR9aCJEhbm3n9gdcRRKaFwDsbYgUrXw66zAiBEaJuDbI4CQn8n5XCTJM0Xhr4KK+DN0Ow7ZKQCn7z6Pw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":262301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPDFDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZZxAAiAMKPArBFC42SCU554mhidI+ZSKh24ZH3yprjQvcuLlyYs1c\r\nJr0s2YCgAS422L2VNW++OgzxCNovCVV0fBAiXFhzwaCr4DXAVNetDbKgM3g0\r\nsB1Qs0U5y3BiaXv17iAGl+JqSvWIp13lk+4MgLsiM6Jso7yPEie8r5kKYud5\r\nFqDqnyuPLcIzOgCP3E+L52CUJ+tKy+kN1gov+jp/lGHL8dcKbFJLa+n1wQyI\r\nciEDzbrqHN4RZwabImNiaUv62BpVOBEKfg+Fi7pI9auVGuvk5LRlCcGPCFeb\r\nqgW+9v6zmQcMoafBUgwFuANuWe0K4sC4tnhId/vz5jOFdEDpzW2rp2I530jq\r\nSdnUuowM5mZnvWZ/F6MsZ5F6ORmZiX1CTq/YgQeXcAmdXmdw82O9tuDiwpLa\r\nXN4lT3E321xvRVlUfti2zZ6M3aJPqJoNB8YWeM6XQOL8prgz1hAtizRKEJmc\r\nNAVH1qRZYUtIP/th1zpg1K1owy+sUuP3blJpqVmnD1RcOrXWU2ksusvxGxZc\r\n2i4Og3EP9PKTRVFd8eUSeJEMcXhrbzC7SMvQkwrLrDWhGPYE3NBRYN7lVijp\r\nyzPblbIN7GONUSqReVGTmqUH41JFLxUJRxhl02B35q7fVy/+ZWE9vAwfFxdo\r\nlo47reOulZOl+3uOESaQaJradM814Ctnul4=\r\n=ejBV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"2ef01f3f878973f4dd740024158fce90abb4173e","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"^4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.3.2_1664889154762_0.1445267563177426","host":"s3://npm-registry-packages"}},"1.3.3":{"name":"@akord/akord-js","version":"1.3.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.3.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"2fbba5d66c46a96f430a052d7173b492fb788a0a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.3.3.tgz","fileCount":75,"integrity":"sha512-MuRztxx3BnhZw/FDbpjkcy40VUq8ULT7XtHM/2q7GhxKjGjlC2X4tSlw2c7wc2mnlrqxpgwCPwO27+WWoJfBMw==","signatures":[{"sig":"MEMCHxgV9UR1LkENyiYLHpYjh1uI066IFL9zVzaT+LuT1/YCICOKaGtq5fZ+5MKJoEOGA6HepfIPrb9Bx2H0xqVXV46u","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":262300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPFRgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqelxAAgOcbTc+Px4ac4nt4MaPAYJGARS326sRroRYPrrmpBqjHV4cd\r\n2s7W3EMrtDSuIewVEzsBtDMVarzYuCy92s/dSmT10uF4Pzq9M7z3WXFgz/L3\r\nIchMwF6zD9HjFvUi4eVxZ9BVY2KQteCTuayJAYM0af5V6xwe4i+MBLF7OHix\r\nFRRbxmU1jRYmR0+dDS/aAhKLEShk/B0RXd6pD8B5t1dPYKSMaoVBYA7oBncM\r\n7tkXm8EMj+FHo+hlX6Pz0jA+Lj5kURDM2DxG7ZGwFZGC6vy1OmK5Td8H8/W+\r\nmoLk/XRBSxIK1d9aX6kCcgbgKdSUi7bRs2wrnqVZACxgTkZZs67Je2dnFUyI\r\n8nxZTGIODNMmtlHbAnlBEsWHPCSkIC9DqG8Z4luSvpQQ6xE/q7Hd5ldnupdt\r\nLyM4RDjjbDQgfGh1UZ+bPKeRnAkGM3A6wahE5BPpu5pmQq2+/9mFOcdRBpnD\r\nbb1dGWSLjangDqIJlo5KIgrcbIgebriagduQmDoz8IxMM3Zh85nnC62/Ecta\r\nAKlffGIFw+0UiK4GCJplBOW3HJ7l4zW3X2/e1ILvvj3P296tz38IM1uQHxbH\r\nmGlNjH/TCIxVSvXncYSheEklcj4ax/od+5jRTPTYqnQN7K7mGzZui4fWe/Qj\r\nAQnhbnSFtkj/GNXjyRTu6G5A1g6lGWUGOmk=\r\n=LtEV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"fc3deb0ebecfc8bd578f7e51be5563e124dfe325","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.3.3_1664898143794_0.685107711403304","host":"s3://npm-registry-packages"}},"1.3.4":{"name":"@akord/akord-js","version":"1.3.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.3.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"8321e75d13cc1394eb627946f4927a9e5401eff0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.3.4.tgz","fileCount":75,"integrity":"sha512-IVQ1ak/gXqOFAhbQsMineBIXLuOkZ8+Fij/+VYl2WOeb9kMwQqo3f96pa+P3sXn38Augj2dThsheAqKTuDb3Pw==","signatures":[{"sig":"MEUCIEfo8eq4uONCwvwN9JLQy1yrjNJ61SKkjGPHu7MiNSp4AiEAjcssisSxZcz2gsJ92Z7iObFk8WgngpRNI37n2ksnIo0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":262357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPHDMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVJxAAoj24cpb9SEfg6gVUm7ty1Se7c76LD2Y5qZAA2v0PgG/2CbeE\r\neB5brq5snBPpBiQNhddZhjZFjL/QT1HqvchLs1Mm8Q+ifCrIFbluNjAjuryA\r\nFHGwd3AvZ06Wu76+pSZr8hE3qrir/wcfYIq1BHWWuXJzolBF+LAPpaYp4j3v\r\nguT9OXGUfeaCo7BLw9r6QRgFD28bBusvTZD9uxBgfmGJomw3Ld9Ws8Ed9m06\r\nJwDxrg3acwY+03KpGl2dlPdW8X9AJCae5Nmgiu2woNHlgxD6xQb6Xt3CFvJg\r\nFbDB7Pf3Buxz2LmKujoSM7ZcSwduVFOvQeMnqbxZZckJuU6l96Qbz8aRm0Yw\r\naGYAubRbhPt3HtcijB3F3gJF35Fr4byx7udLGyX593QuXGSYacgxAKaa/L8c\r\nyON39N+c734KIJsUAedHR4ODZKYUdwQlthRkJGSg/Sl3u7698rfhpsmijnp0\r\nhms5ueoxdjSdYLInvsIk6HmTLRCs5m+zI2E991eP64pszgPCWoFVUninFgY6\r\naosGxP0SlQ0eQJCXW0VETQdU/Vlzzp/x6vV4eiNBQUpEImkHWHiS5q/Wcnbn\r\n9KJxho8i3up97uhUHCj0Ae+oYDis9mqiVGTct33BDTeNzKQGyAvdquNQJorx\r\nFZM6zWtQVIGay1JkWALZKJxXUwgn7ZjUBgg=\r\n=Qs73\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"94ace5fde7c20bb1627609dd3a09a77b920424e4","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.3.4_1664905420123_0.3612817406165614","host":"s3://npm-registry-packages"}},"1.3.5":{"name":"@akord/akord-js","version":"1.3.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.3.5","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"0e43663654a04858f79243a0186b6e541f0735a9","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.3.5.tgz","fileCount":75,"integrity":"sha512-lRqtC4hb4L4JcuPh/LERdyS6X3NvTd8RX/JAMp4K7VlrWKNI391LPgNT4kay4KkyumR+3cAHxVCDpzrcrEtaTA==","signatures":[{"sig":"MEUCIErOshkvJh8lTcV2S0oCsKooNwHwZiDIphr0jvh9ZV0GAiEA3vpggtRqgVBeeAe39H5HmpfRS4NtqjycEzEP5cb+Bl8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":262524,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPTf4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqlBw//c9VSwS5jFFP+8nf8ZvovxXHs4aLfiWngwc1AkkU+pn7a5UYW\r\nzl8EVCzh+qTSFEH4fVFVoOmrdWCUTctE3TB5/1tHuCPF9C036SzdxUu66epx\r\nzikgy3hdfFKXCT6XBfvdFMbBgbxbt44WQKJc9uTQXvNBV/0XXCE+70EompWr\r\nNOmuMXwiEGbWEXfLd5DiV85yi8NEZuVomCg3+CEZ2OPlRTkgffP+GjBMlVws\r\nONatgsFJOWp0T70zPA9cXniivAzgUtLAqth6Uot9v/I7dwRJ7w2fgviZxJpH\r\n2MsRo7qPt/9z2cz5Yaqk500TXFcNuy3CHpLt3nsGqZFbOHUwoSG0ZmhIXXR2\r\n/UUp3RG8g2FwY8oR0anI/FV61Z6l1zJqtrAMTOZCjbe2FXmyk6qR708/9y8g\r\nGhGMIksz8kvCw9db53m0cGJY98fbN9hn8WcOUCotkBwh9EieDHh9txcthFmE\r\n+A3929yTitSh715opspRigFL7N65L9nuc/NsxJq53vzXsbxpaKjyaMiyVvrv\r\nb0YyfD7FqS9w/VB4OeaByEnQRE5ptF91S++PzxqsVOM0bG33hY8vE2AsAmxM\r\n8tcRHCLRQJY3tWvx/xpwYwms2PKfUM1t2kVGs1ZbSGpSvfZceIA1Q0vQ9P55\r\nrvv8TEOnr3cqb0tSX9V7Kpss0horKrFf5rA=\r\n=9yQp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"9c7c7539204180aa418dd014be70ec21acab0ddf","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.3.5_1664956408377_0.9966383442888784","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@akord/akord-js","version":"1.4.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.4.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ea38b63a9fe5e342022d9d2719e299309024ca5a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.4.0.tgz","fileCount":75,"integrity":"sha512-gtKmXzCSpDvdSueGdsJd/WSH2OC82+fpofJeIPpyEToJfD9bg5vInSSGduxAGwA/UdERUVJNixHSxrQ4XujUVg==","signatures":[{"sig":"MEUCIBxQEi46r8GlLZ3OIDIb2za99yPV3rsXp5WtPwbbkvccAiEA38Z4ELzlYM575F1vMuCU7oiz9ZcK4YD0G5NgNNnv6EQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":264351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPcinACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpbbA//WmW1FRm6irI4ahDt+rOTCiGSWkty+2XLAiP3YHsGE4g+CqX/\r\nUMZTIOMWbLghyJWfzQ7QxU7KBO5IUVQ4hQyk/2fO/3gCerHIKnoFHJ47sqdr\r\np04ATLhimB24pRV1StiK7TbEERiwCzwHPA0n9mECmCVTV8Y8cdlYIJZfXh0W\r\nkf4KvLQEM9Uo0YRojVhOCXN/nn8CSD7mj/GM5P2IwqnwNRfCmv+9TBM51uR3\r\npa6CvzFstqkrv92qVsGJZsnK9paqbRnyqc0xiIYHNun7fBzJ6odVHhACNaUL\r\nAzm1Fl2PPI4IFiV7/B/3HXqEnFX+kc7BUhVB8+gJ77bL+iSeyIeGmZtMIhLi\r\npPIPPyETsG29MXexLQ7jCe8jFusJw2WOsVWLkR24b+V0kmIrqEp2wrq79UCO\r\nnOWIpI5Xeh5Hz7KuMVJow58Pk+nQtfiddTdTRka6UI/ZFUaWzgRk8/ETvSFG\r\nTQY6n/WtNGGBpqXKBrsxaw4o8Gfe0QRt4AYOANcX5UwjkhD2aDlibIHdQHmr\r\ngMEBEKio4YBOqetO2Ua4EPwA89ALf6TDZtmB+2EsalrO7uq9PFS8rmPwVKhb\r\nET0IWmEYOadwnggme8whh1+eFZohv+urjp0ZR1cLIuNq/NtDfh+e7YMBFwcX\r\nULyxJmEZjgx07lZLISdD9jN9I5bq0DBrUaU=\r\n=tePO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"2816afd329c1f153d98ea82b560c2d6d8c44f9fc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.4.0_1664993447109_0.37074668663896326","host":"s3://npm-registry-packages"}},"1.4.1":{"name":"@akord/akord-js","version":"1.4.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.4.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"58a40180ca482ea2624e4a85247b8a67f85377e3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.4.1.tgz","fileCount":75,"integrity":"sha512-R5J5m/4G7zzXfgMY75z5M1BkNNoYFqI9pXJBXodZP8xz5dKBeBi7RxizVzLtf+0j7i1+ly2vN7TCl5339JqeLA==","signatures":[{"sig":"MEYCIQDLC602fXLVKZQYbsYyw63qlbmhtzTBcxFrOP8OoFcxjgIhAINOWB2xu+BFzxu32sntaR1OPP6aNzNSj/FGorh0SzOD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":264352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPe7JACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5ChAAidmzQB6sldpveD3z7NeXE0tQQ+qD3YfEFaF+fTKiKFvcXWXh\r\n1InQ/4cRmZ2ofgk7e054mHnAHjMnd9DS2O+bR6C8lh4WUEOfCT14KztspRxG\r\n3JESTU3Y9jIuDcwY06HnlQqb/+sqb/Y4hJgpRGtsRs1A8TkPtG2fRxlY0D1k\r\noGsULhLRWiRJavyl2oJD+NU4Y2qIsFfHtwehJT9WdfSfVi+Pr/Dd+0zquW6T\r\n4yJSdXpyk20gBasDTqPO7rDPEcX9QLyFMUhP4vNJgNQ1PbcyPScENcVictbM\r\nA6K7Yo+w9Kn3amzrTgkME+OKNtbpp/0Qkh1YP7VJ16I1U4ogTfcSflmXtzf0\r\nf+rGd3o8QAPII1a/gYCdORL/+Hr/wdlzNimSZPYignpanDZY839xzJ1tBxj3\r\nWmGsCu+i3k349nxseErWFwgs/dlMLpTpYIcFhrckZoXabr+/JxWVGkrvpWX6\r\nlpOwq3rMMiRyueJjAsDvzHbId0EMvpajnp2hCAKKCg9iNs56nXHwQWDAtnqw\r\nd8wI0ZzmhQGhjdUGU+pHg0M+PueB3MHUMKYbqmECU+jtXzVdfmcOd6bKJngW\r\nfPgxg/pnrsEABETgN0QMIWD8O1sT7+ZCaz0dhAupypXw0CFF+YFQDiJdG55M\r\nsuBDVHT2iyQez1Q9sHTXURsTQKvPIMohnCs=\r\n=ccwJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"d3e98ca63962ef96d56c1071eabd8a5e2dff98ec","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.4.1_1665003208894_0.4122213819473859","host":"s3://npm-registry-packages"}},"1.4.2":{"name":"@akord/akord-js","version":"1.4.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.4.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"cfd8c25d7a423382529ac77f610c7b9ccc7590ca","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.4.2.tgz","fileCount":75,"integrity":"sha512-OtyCFO9K2yFBpv5ybTfLHOfbc89oMRj2Q6B0aUtY09BxCvcx4pxCbwxVczhM7d/xa/evt92sh/12E523W9Gqgg==","signatures":[{"sig":"MEQCIGZ2QT+usTVLUirKFSQUhcgGtYBaPLG5UIJ8zBl7ptTaAiAYiNCGe/fwek7ZfVa3pU7vpIzEmUcY9diPWpu6U7NWTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":264810,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPwQvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmodZxAAglTQUZLCcG+TV/9HinQoa+79IRoOl2xRaV6H6o2dPRMozyQ3\r\ndIpfjSn9Pp7OBdPiaia2wbEDajx7fXinEx9/u6qsiji9EK9qK824PuZtS0Je\r\nCY+ydOM41/MeUPPHRl1Y5lBFpcOgrpUG4Tuw1j2Ou4MqK2eBwJ5dRGXhkowZ\r\nWBW1orJ02mLziIFlT694Cb3+fFwXzQL3e1eeFgy1X7K8/M8WwuDFhrNWugP6\r\nUQh0S61G5pktM4ptwHFvwGFhkDxyKxmHX1YNNCjd+BeCaBLkgVsqc4xX1i00\r\n5a8GtOBCXdNyz8WhkgItHqVObqsfhFZt0cxOjHFl3zqajiAveU60POjOOT9m\r\nnegucbB4G8leW7bdNNk/jDviNrFDTrh/nPzp2g9BvzlzhtdZUO/sYke5ZVXk\r\n2ITFRJXfQA72zROarg2c4q/t4dj/BapBiUJ3hTO9iHbmEDAp2LR5MCUspDfI\r\ngb1t6jh3JNGAFzyU9+aZTO+l6r7j7sZc+jVb6gew0z/JvIIyVMquTvrRmASJ\r\naKF7nv0VBo/x6vvdpEyg6jcCKdlwuhGjfv4VtGZYKlXFxgA0zB5QfB1jpIf2\r\nt9mjsZEZxwsMmdT2SF+q5yQHbn4V6yvRdIpskq0mjpL5+bBLeZHrzlwG+DFM\r\n+WaGUlqpZ1zU3VgvUC0JZs59/JgIt0tYbqI=\r\n=6jd4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"0f84b79245764cfb9377450830098f41c1cfaf19","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.4.2_1665074223153_0.3690825174747505","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@akord/akord-js","version":"1.5.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.5.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e5113650024722a2f1fe24cce527c877d1b3c722","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.5.0.tgz","fileCount":75,"integrity":"sha512-dap3XL1KtG7QEG9PHJMzRpEFBrmKssHiCdNf2idXZ7W/D/Zf0g8sq3tEz1uScDyfnrK6qdfnQezA1OnjaTLdaQ==","signatures":[{"sig":"MEQCIEwMDtGnsHcDzcLrUWl3tb6S5zmb+7TT6XIjoBW5+0WVAiAqgNty72dQP088G6Z8K1cq9C2Ji7S7MLjeZOZgk7MHyA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":266075,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRB0CACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrfbw/+KNPvk8rBiMzj7v8p31fDRgA9iR7kmo50uL6tMzC6LWz5eDS+\r\nO+4J0Segdn66J7QB6uRFzEnOP33qAVkGnAirFZ+DGgh5WdCpAxb12J/cxCW8\r\nGyTLdS1CUB1BcLDyBojgM9Ki85UnohKW4g1c6BKkvn8DJztk2ynMQD+k1bHx\r\nLUNkVkl4RtLoQH2+SiG4Y86ynG25AGygKkh+xnrPIj46+cspfIE/kMMdi7i1\r\nZAFIT4B32nb19ESQZyqLp8lH6hA/w4RQIWmoPhq35DGALBw4LAmRU25/L6hk\r\nqa2PHeEN+ybNmL80G7klYI3QN+bgmiwgw/FQ4Vem6+H1aTEJ9dAPpsrizRBm\r\n+UIiuczk7Pjf7OqI03kmJ6rb1M19S8FKjqklI1oat6JlJrgIYeWd6MvwC6Vh\r\nUtJG3xmKe9UW1OiWymbZFCnt1RzkkhvQyrNEzPE/Wp7tkowViLFPmakLWzxp\r\nnSO2lcqC35jdCNmyb906uNVoJTJ/fd/EW8WIyrcTFeS7EkclRuwRnisiTbTE\r\nOVXdryJb1JtFEw4r2gnO/QxpE1aVq5ch7Ysra3pzxaRafHDjsNmFUWNWad0i\r\nEpVI6xnWBD2vB92Hhe0lEH1eS2Wx5PzDu91ouIat+jyxrlABqa6LYyR1ZzcV\r\nCqxrkvRCJc3RtcVBP4TMnR1WisaAZ2EJj2U=\r\n=0Ybw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"d299477fed5caa22aec72093f5d32f1157d5bb38","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.5.0_1665408258574_0.5680244663454386","host":"s3://npm-registry-packages"}},"1.4.1-alfa":{"name":"@akord/akord-js","version":"1.4.1-alfa","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.4.1-alfa","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6e223600e674bc4323937d669cdd7aae95575cc7","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.4.1-alfa.tgz","fileCount":91,"integrity":"sha512-qhROLNfZUr4IUhc7Cdg957KkdR3j9HS43NWdMeNC4jXtHVpOpDUyN2L5GOJy4JgklYz/35r0S5hqZL928kJElA==","signatures":[{"sig":"MEYCIQC5aFmItRuNxPY1mUgIvTTOQoZgb3VJX77vnWywnDImCAIhAN3yBacBjDOgGZZPeyjpjL4aPOx2feneKPmjXryRRsmU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":273539,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRGu9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpdLg/+IoDmVXGa0bvOeRs2K+BhD8CjQASeJO/Qajr+x3uqeyeSUXyF\r\nOqPDswFYykyvFf+6/RJtNnXESNOsIl26WRVoA0CLsrdeDSY5Ul9a1JrSrc7v\r\nAxtL54kHH+5qREYTTs5sdGIMW+48aKzDcp8DhN9iJdQuWuU7ah5r2lTl8Ak4\r\nh0M1tiuvB9Sc2XImlwScD7G1+kd5tilmT5evMR+35Ma3NZTRKbhXF6tbF/q5\r\nRQOmG62Qv8POS+r5HBcSRoFGKeXQLONUE8gTwokRWZILmMdKq9U3tHiCww3/\r\nyLM8g0cqGql+hfcb65hUD5kokY5VgNYBDZ74IY0rP5MPqTWXUFjov0m9mwJi\r\nWXkZPleuazJFTxXjLk5hjuODmrN+CBtKIqUFoxWtdlHIuFODFJUfehbDvKG1\r\nhnBTCHuv8n6Ez49rg7K+EOVDJ0Qj4wc4h0RNh/Xw7uXTG+8ontyiIR/b31pc\r\noJS+qWAwCv7RhYpqLq9UCGYyIJAGta5dJmeaK/n3HZMvfFlam9JPhdXuRDZ7\r\n3tPZgDvAr9XpvzJbSIepxWMKWND8Kvn+zOELVkUlhg54VQITKYMz52iMA+pM\r\nJ22bUYhN6yKrneMW+G0gfuaSgQLFOvuL34AEmDyH+yFgxgHBVFviz9gkR2rx\r\n3LIIAGXLJCVAnCSBIET5SMpcko+gFLmlcdA=\r\n=D/kA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.4.1-alfa_1665428413147_0.004500863219801365","host":"s3://npm-registry-packages"}},"1.5.1":{"name":"@akord/akord-js","version":"1.5.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.5.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5cf11d2ae3d4d03b860287c1182272fdff81c5f6","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.5.1.tgz","fileCount":75,"integrity":"sha512-eOLUy87Fvxl3ocLp8Lq8j9qKuJigxDM6YMZXrYWEhuHmWJ56hy7UmnQiJuAWHGcCfQU02CM7AgD83kuNGRl/Eg==","signatures":[{"sig":"MEQCIBoLLJTiQhcfzY18HhZ2J9GBTSrPhWWfWn9LZ3FQC/W8AiA0ZvNDz6gGUxExNWW/N8J7ZueZhIAOOiFfj7ggCN2O9A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":266208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRsAXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKRw/+LipR9Kc1Z/lPVLkgzNZ4JeCrSBYpyx9V1rtFkjgINkfHTb7J\r\nq6M+Aa+2oh0iICuxpqjKNhrwnJXPs0Ht3JUZ/n/AKCVHoE7R1It/s9v7/Kcw\r\nUS6Nwi+Cr9hPnSu7tBDwUBiMlUq+Lyv9YjK3iwL5WdLRO3MEemMz02TZr7fB\r\n94BbVBRAW4dHuMgf1zmEMIJoiTIiqSg7yerit0hVpn8cJDyqj+HI2GBbLFM3\r\nwbzkLAFHe6V94Os+UUWxIL8L+LsRRkaoNqr++FBjxUqvOdMs57Sth57DaMz5\r\n18KMkfn6r5mZP/SVHm0U2IrU1/zV0MkTU8WR778wQIo1AvnGYNC7SD/QqpWB\r\nqSUp8hWz6Ujg+mTqd1wu2UKKdaBW1WYaHPbNppxxHPhHMwptjsAzXgMSMOGJ\r\nTrMA0BPtiK23zXoXEpSP/DWn/nR/B+951cCNVxFdYy+K5nfPyRfs2pYTnSN6\r\n26spx+rX1j0CxCX8QdHpZsCoa0Ppph85t5NYVEY45N7vjBMAmzOit3N0rWt0\r\nk7vMP6R4qP7cqEXwsFzy11NjKtIAAWOaUG/v6H7+5Sa1v7TiZGuN377vCUlr\r\nFRpun/ivRpG53yM24gVOjaq/jIxIPh7ittjL6vcXzWlAzFOLIEaC2HngRWic\r\n51oVXoLEwUJ20Uca+Ff2RdzsNLx/8IP5qAs=\r\n=RBwQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"9e1ec105ce1484c299624f23aa9098cdf5c6bcf3","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.5.1_1665581078955_0.9526690528692772","host":"s3://npm-registry-packages"}},"1.5.1-alfa":{"name":"@akord/akord-js","version":"1.5.1-alfa","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.5.1-alfa","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"310a0872a69e4802d1a7c1862dc3bfd3fc07bbd3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.5.1-alfa.tgz","fileCount":91,"integrity":"sha512-coBnTkkWe/b3t3lSasDT0ghSje3XdT06R252oY+kTBesbrEVYvqOEKZYjcEqhalxZGqjmo1NG7ohuKoK7nvqng==","signatures":[{"sig":"MEUCIQCdNnv0do5ep8+FzVYdp4Jw9b8qpGLZ0ia0icyUsts1dAIgcZNRj7CrdGGiV+Y912PdXFi+Yd76IGnaF1c/IUXEd3Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":279922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRvQ+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoKHRAAlsREMbujZYuDqFagICvvBq9k27+64HQq+fh0NnyINvj+bdwb\r\nY4ccrGYfZyZomT/wAqPEk6wfI4Pj6Yah9qaZFN4szw61ZpqQ213o9t7Rfw83\r\nTUhBa1N4V+SC5zntFoGdutDz5Csuwenaxc9Jz9L6REBAUE2Xvw/+A5KFA+Vq\r\nazsJyzSh5j8t6nFWv3P54GHVT+Kj0TRQ8i6O1eo1YSRhf7D6SoopJS2X95om\r\ngmXyK61DPx9Aq4Lu7jryHCZJ8xLfPaTEDHcZaYoEY3hlJeBvv3CvazeIsk0d\r\nAxjgVCdOmvPKpdcnqcL//XueVDlAsxw+8+XKpt6H9y8jx6vRzFOiksoldjl6\r\nkkRuJ82FFheC/8uPWDDSkKXuNkiV79WzXsa6PEv/fLhkUsVM9FFU19s4BVdp\r\nN7J7LrRniNipmFLzMRXaHFJMXSeFsAO/IK+qu7/Zx7yQp9ugtkz5UUyKIGRM\r\nDlYhuv0s0WBX0GVTFb086M0JwYKsYa2zw3b+CwdmS6K9r6GjrLpOZzynY62T\r\nVf3qRgk+TSUq4rssVAWUb4Fm5a8tdmT4d+aDEeECHUGsfUXbxCTN5FKQPTV6\r\nmLql5C1Y7pCaz5aOTo7WiN8Fi+VMHiqVV3kRIPN1FOUsVc+DespmNETtDrJk\r\nYivQoYmfVPokKP4qwixSRUtbeKJcib51FkQ=\r\n=fejO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.5.1-alfa_1665594430082_0.4827494030190862","host":"s3://npm-registry-packages"}},"1.5.1-beta":{"name":"@akord/akord-js","version":"1.5.1-beta","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.5.1-beta","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a5462a327ab4d3ac9cb5e090deff5b754f3b1c6d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.5.1-beta.tgz","fileCount":91,"integrity":"sha512-D8fAwupREqBsEa+fnJM2MQ06UoJ+w0WJ3CgerHDFiuqygXvxHOIF2GDkk1rdY/B93AVbEDGCDJqP0ymMMHlXcA==","signatures":[{"sig":"MEYCIQDMBEpDpDvyl8otQP7mNpXvWYc7fuztZkcJvtrIvjhl2AIhAIUIYvHwwuTxq9sWwfQava1p0egBNs94asF7CHljOcwH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":279947,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRwKSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrawRAAmWOvWF7TXF1h0sWt0UAWv1k4iUGyNE9HGR1UMkC0mKpxzZG1\r\nG150bwXXkZszmB1ocq8OBLGyAISLpKCqa40U5/OHPIqwcMvvfNEH43rTOTkI\r\nyTKKH/vyY7l2OBRU2NciJo5SQTbV+CC0Reh4FILY9Ys9tXsZ7CIipg38IIgI\r\nex3k69w5J+xjfx/oJJpA8zk7s/QrftndCeXfFZpQSccVh5n1NmCdRWwj4Z11\r\nlaHs+rVHbHqaHW8kYr1/f8sSffWBfpQa1edWs0y00TeQdJJNTF75xGUND7pS\r\nNJAsa0iT/YAgk0DknLV20pjCbbM8ftjJ3W9ltMVmsMVsnSTWzgSu+GgaPoh2\r\n9sFPngkgcsAuDoc4xJSwVtW6r9kSdD4/fFpxegtyA8egN0jNoW0lVmNjMCRr\r\nIcxTLEkxRTo68OJLJj3mmAYz9lT198WQOjYx3e23eE1vT/qfJdRccVWdOEy/\r\niXGTcfbJr88tAXK+G6mt5zSMqyVd17x4VaVqJrDiLJVbbJdxY74SQppO0PeL\r\nClVLyeFAFeLqt9taqnuBIwimlAhKxGS+oKS4DAciwgkGLxtIQuo4QcERkXyC\r\nid+twVlw1/HZxT5BIqukwq23sJZVm+3dVTue48DLAMMTOH7YxShnt+KtPZVa\r\nvRNGs5CkhnKlRmw8ouvjRoomCUmPgtB4EOE=\r\n=/l5F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.5.1-beta_1665598098702_0.484871947048783","host":"s3://npm-registry-packages"}},"1.5.1-rc1":{"name":"@akord/akord-js","version":"1.5.1-rc1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.5.1-rc1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"85cd6277a58b7fc511ab8e65af215154d725da70","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.5.1-rc1.tgz","fileCount":91,"integrity":"sha512-Z0RCXndOW5bp1F7sHPuIKdWvC4cOKALPZ76hj7q98TzuT5fXXmDRKHasXpS/82XNEVRItXx5p/FmBzKvIIH0Pg==","signatures":[{"sig":"MEUCIQCcPnZYXAZBfjY/e3SbleRr5eHzfYkkVxZWPiimFPl3dAIgAVhLAw9tSa38GQU412nADbyebw+E8/UtmLZZo/Hts7Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjST1IACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHhw//YNyNeJxfHvlI1m0LVPaPIkAQmukDaFMaT2QoeyYpMB+p8QPV\r\nThipBjDFg4nzYaLmRLhUWLhbHyGzlbQVH03BknXY2ynTDze8pubVvnH9sdoc\r\np7+T97JyNqQUni95p2oloWo12pjAydhiNXOE5VGHFdCGSM5iCoyTCIzghhL2\r\nIQNS8rr9HR2j6nkRlIr7IYdmL86WH17IfvQoOkoN0aHzjngWFYuc8tBYIyce\r\nCHG7B0isvFYFEtaBS7YacS/Nl9CeoSyCfEP3DN5M9tElt71bIxFDSA4a7u0j\r\nj1Ym2mXq5XKb29oQo334mXQa3cMPgb7id+ul0eovBOxw1LwCjJal+RvQanjz\r\nMYpuonsAMGGo8igcXCETvKTCtVMvk4K7i256EdRNE6yYKUL2Xy140oy95cXP\r\nF4Fl1D+pfdI8JxhnswPZKgEZ4ssMCHB0el1q47DJq8iaZdKcqGX6P0dIQfVd\r\nSDkQkrD0d/d9ons+Ua/I0irwux0aEku5hIOfv5ccS2cVcOQ+xf2dHVGZAzsC\r\nvX3b1hRvZyjrVwfD4LNu921WpiDKNE3opFM+Iy98UCvRtANCPr5muosLpEA5\r\n4ud7RPG1tlv8JmWO3XuuiMTgGGkLzcpNCV8Ggp3CwpG+Wm3eObYiCyQ/c973\r\n3GDskH7ro8UbeyNbuqeYxIOjJTVkqu0Di84=\r\n=XV7k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.5.1-rc1_1665744200234_0.08948266544253336","host":"s3://npm-registry-packages"}},"1.5.1-rc2":{"name":"@akord/akord-js","version":"1.5.1-rc2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.5.1-rc2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c13f02795b9f32152b389ec34a0b2561e29b4a16","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.5.1-rc2.tgz","fileCount":91,"integrity":"sha512-MVSlm+7ds3eo/z+dIu+N5jvUFnlcEg8k6C4RQC/tfBbIZkpbqNGuiaa+FBcgKKHIT4PQY1sKPapieCqqb9shiw==","signatures":[{"sig":"MEUCIG+XOf+aGIMVdEpjVce3gDyDT8ZRCQ8HqaD0jrIp2XFyAiEA7OLrxrYMhz1ItstHUKPYvgyspdXcV4TmM/SoR6NSzLg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTS4KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqShA/+P4mXfHplSLbJJKgV38eS7lgA0V4JPui818mqXnXsBYM9oCiX\r\n+JRyup5hBtgWuM8WR3zRlD3SUsAassoPKmHCQulqOMzeER9gjaNg5UeraxvQ\r\nLVOapXkuMYufThJainCo8IUduJypxaUnFqr7EHweqlybkueZ66fieRfBCYGF\r\nr90lR8i+7o+f9utp8Xt2Tn4N7AbT7GWh7p+wsv3y72uHkOp2F3ac4UwUbbfM\r\n/Sb35Zpj/4MaHEQBOEvNYOHtlY1x0XmTyX1M/8x9m4BHCBoUasrx88Dq1ojt\r\ncLui35UpzqfrRV4f9xxMTke8+Q+KKgHjyWLTxYMa4+gYSkDYX8tPdZCk4U3L\r\nn2LGlRKX/1h2zK+TpkSkCxMQEy0oi+WeZ2hW4fOAYZjXnoi3KU1xMfGO8e03\r\nT0p95cZYb//kO/dYdVKRtdg6HkNiWpjQ7wOBKj/6U5drc27LEK4mUIAnrVUX\r\nPLaZeCyEcerGuEsbBst666Pc/sOGnITfWjjD+WifmsgtnSRib4td0ES59G2m\r\nKqIoxBh47bpjTM+1DmqwQvP9zGqH9FWEtVYKkbFxfQc8dge4Zid1BzHb2Rw2\r\nGmCrRHftszyr1DyoGV/2et9ouTkQM1p/OCEC4rFI80rCYRZFyOgD8b/q3Jkd\r\nJE8N5B+C4nqPlybjjhSfXCm4Anp3rh/8VKo=\r\n=KXZY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.5.1-rc2_1666002442297_0.7248967849250829","host":"s3://npm-registry-packages"}},"1.6.0":{"name":"@akord/akord-js","version":"1.6.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.6.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4d4144833567136d08092f0216d6f5099c8d1c9b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.6.0.tgz","fileCount":75,"integrity":"sha512-bqyXmCtFuburo4QbRqpXDASTZ12OA5DeE8NjEN1jZZPjXKvKRLUDFlhv6O6HlAI4jU+kNga1gpwuXgUfsopTlg==","signatures":[{"sig":"MEUCICwlVroP9hvlESxmWhtx1JARXKySlmsOUyx81mIWCjO7AiEApsec51gMcBDeqhPvnEbA11A/KNC2gfvaTQFWoRhsJkM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":266890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTlx9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpE9g/9H9EkjujvrdHHril0WKXvTO9xZevXlYc4LI4+miCXnUuYgO5F\r\nYS08mqSxpnKGYUG1IZD9G/D+4IkC5+M976v7Rqxrvjls8zGxBb9qEKOmjfBM\r\nSC0Ju9JZzKEJqy+eiXEUnx0Drr1keZSlD+r0J0IEMBPFVbYZwTwj20z/sVoG\r\nU5FZoGn/8Pr5siPrm5wQ2GORJqdfR54U7S1/cxYwhtR5ULukTczXS/Rz+VXg\r\noyBYLFQfmc412EmFAPGYCod313ciVNSDqXQRgBhN4DpLasFv5viyf/qhJwnu\r\nakKGeIHmPNTWPZMqJUUMKgMIh7fRiocP/JDgT4DaKVzGaya4tqR9n0vb3mRr\r\nL99WNWbBf3dbXpYY1XQZACOnHXK9FMtqRhg5XZvS9GYV/nJWK6AslN22VwvL\r\nqeDc57WbBP79o21uY+cVkhmNuAyviZVsylVAMOjCj6fjZ2tKay7kUpyiwNTT\r\n7Ss4m9fdt33pLI4IfDdnvGHyd1S6vkB1VGxF1qTZ17KO8XTqipQgxe3KIsMU\r\nJD8v0jXx02Y4mj0TIk/ZhVaaaimwvpTbmtg1rkVXIOs3cKu69WWdCGBHgGZF\r\nhVkw+NiA8eG3jQra5lWnqlk8Vfw+EzlTYrhzRzb7btexFzBwzaVtyaKzUHlR\r\ng678h1FqLmK7sErBxS9lS2EhjTg7K52YCIY=\r\n=koXH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"c228a33b91d1030d40f672c039a36c86a5f4874c","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.6.0_1666079869581_0.8045749218747762","host":"s3://npm-registry-packages"}},"1.5.1-rc3":{"name":"@akord/akord-js","version":"1.5.1-rc3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.5.1-rc3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"05b6d460b331fab8e796bd50409eb2779d10fc47","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.5.1-rc3.tgz","fileCount":91,"integrity":"sha512-wC06UOE4mExL6Zx8j6jIDiGXYJI/56bXQsNej49YUQkHzxVKbs/f7nr9D6ovvyHjcznY5K5+UM7ymGBHntfZ0g==","signatures":[{"sig":"MEUCIQCuNRRauP416FcZNgdnNUabzYRhXtFs8aPSGGz4UstVYgIgNJnx9fKF4Qe4Kgaokl4K3wL6+3/CKj37G8y9mnxMeIs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTptMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtihAAjKXa0VllcHj/AdVcMPVS6zNUmg65a+TSfkxFsdAKJIkkHual\r\nTyZhZWgrM7iZBuQDJSSmvL6oERrMoWxgVYsPI+QX5KqssaonLzq1wlR23aGm\r\nsoXNkJrwC9f6ZqE66rvKwvjHu083sEG2HaZ/ZRA/mepfOu9az2m2l/5xVBny\r\n5h6npOdyxMuUp0PEtfEdcrBDMWiNeRm7pyZKMznlWrBbiIavzMIHg9utteTV\r\n4x1KRJ9Gc7hKbxZHYlQ/Sugs5E8AJXTYXZqcn/2h2P4Xnh4/4ybg0yMNdJNF\r\npIUbrkAbZsS9FiPq68AyC0yIZ5fRMcApighkYsEX6hQCn8KY69pMi8NUKl6K\r\nf0UDgUDxwSAvjMyoWVm1BZqRND6DOkYq3N0EVj2HR0JIYeaL4prh25Krh8vY\r\nWP3hYItHK7U8O5OoogKzS7fI/XFFUi88jubB4kYYoNj0OB5K8w41Gr4retiG\r\nBqzkUa9UJYlsCbQTn+iTxHy4h93ro1JZyLsaf35WfMUeexb/9vYmob1hBT74\r\nPhJMmNc+sjpb5CVS7qnH9munvf2F/TNPIyJlDKFEukW4n2X5ZvMCNvxz1eBe\r\nusFL1n+/bIXQH7oEQh0Xa/b3NBRsWhRnxVWg5YHMLEfrNi+NmLwPnTdU3d+C\r\nYdk9sF+WlgD3d502Wbh/60J6wnNruUAXJFQ=\r\n=0WHC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.5.1-rc3_1666095948015_0.62064527992968","host":"s3://npm-registry-packages"}},"1.5.1-rc4":{"name":"@akord/akord-js","version":"1.5.1-rc4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.5.1-rc4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"83c1dd1d3b8944ff873e9f94675f09d02410d044","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.5.1-rc4.tgz","fileCount":91,"integrity":"sha512-tBbBNBenlpwHjk6eA+cGdIa6MnFmlRNThkXHUMyXD2eM7VjRn2fOmkS0Ct5gksqJ6GoDcf9g3noM1Lv1nV6dtQ==","signatures":[{"sig":"MEUCIQDvtz3ZvSqJfsRFgV553Anp33F8qrceofx6ksOvm7h6PAIgaapz+u17uzZJ4SvQ80fd8guIlsdcKOzP8hV+/dKwgbg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjT+4LACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrdAA//VUdxaF2Ea5aM5+vYm+W4VrP76NbyhA/eiqObEM5VrUiA2MOU\r\nS+RYQjojKTZvI/RlpEK6XXpoxmyRObT/F/IMXy/mj8wS13UageTf6n6W5tbx\r\nhwBuNmPejMAccpHO8QOXXt+K6oqkoE4kJ2qDIsVWWNALOXhu609XMv/778Be\r\nmSWBIPqGNOsz0SLNJnK2ZWmNhoqdthdJhqkUWFKV26vw1kXirchvvn34XB4X\r\nc6phvte3CbiVBY9T6m5KViKsQgKcR4zPhVTe13/KBtk+BwIsgO0iO286n7Im\r\neNNFIfJe1NkbDs1MJI/vPntNFeD26OJDc5ddD6TrjF7ZsiEhgJYmXrH6X5/a\r\nHupfQ3w4XKvreQdhrwC9uWHS+wNW8mvl4VWogvDS2xHKb3pVruldMojzv0Lp\r\nsdryQVzIQ2WJh3SN3LcS54J7wh6qB5BrviUMHppOZrrcOq39TfQyg6o84D99\r\nHShNxLoXnPh/g7V4O9qZmqTVKlG6P/BKezQS/PrKY6pBqsDQ8AbVC8xk9bU2\r\na28VDJi27INJgcF+C1DkYj3ZSNZYWBnKSYSp+PibKBY5GxW2QLeU4JP881bc\r\nxLXKzJD4r3aVw+wvMLZADqJ56knIIfRN2ziM39axv2M70F0hoK4Bcv/lLvwF\r\n9YHDwof0V/JkRn32bEhuHjHUa65PdYqhmyU=\r\n=SEMO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.5.1-rc4_1666182667081_0.9225904698544618","host":"s3://npm-registry-packages"}},"1.6.0-rc1":{"name":"@akord/akord-js","version":"1.6.0-rc1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.6.0-rc1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c7a7a854e48d2b0132816cf871254fe636438941","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.6.0-rc1.tgz","fileCount":91,"integrity":"sha512-Io2vdec/WOhDd0ncpy3Dz2kr2IHRVXnhNXr5Plcr+vO0IzcKSiM1m7j0J05m+Os7kYgewQ1zDtIvpXvUuODk/g==","signatures":[{"sig":"MEYCIQCy2rQ7rTHc7ziOe/ZagrxUT2AFunnXcSrbuCtk70iQBAIhAIuC8ftNHUBLjADINL7xdoL6mCragxBr+RBAvkYUahoO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUW46ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8ag/+N7Llkhp8eppIuyR9DXe/l4LEXTe+e/hHuolpqRkz1fIt31uF\r\n11T8hU5c47cJASgeDlUFY+WBMYeje2lLXx8x50ctlkPJgqHEArPZotW1SNX3\r\ngYaUxERSPPf/mx3A9BM9WYOePvnxMV/KKgRe+llJhSTS6FSe7sEF5lQ0UtT1\r\nKSYpWMkBmHt613yk0xSk3WBGAmhkX9w4dRAIBp31HejDxAe9xEtGaIP2J2F/\r\nmUjAkLwMnIXaPKeT/cIHz8QsAHqLDArZZ/QOMS0HLg87ScIF/tb3GmeHJtlP\r\nmdHKMvv6XlKhushsA02L8DTq8svrGWkjZb1nZUJdnuz/1RdcdfuRNYyy2OK3\r\nv+AVz6ymh+FxKKFI3Bfbl/glDrFwz41ad7Bt136b90oQrY6AovtqKTZsbCHu\r\npuJu91OKuy44RrQDmnD+ruYXFjV6nDsDeWDcggdo3yYMmXyge6lLCrXHbH7l\r\ni5dfFIGG66vh8wz4N69qtMjCZ/CeATel0rW9dsyYCLz/5O8pSO5VcQJSaI/f\r\n9LUgu4zanEJdF+MbSGxBPIkYhae9T7dQBxitubGV5KpnzsDD8Xnwvvtf507f\r\nJRU5k41HGzTy4V/fzlMjjfSrCwYoHPvoMH1sIF+m4tt+Gfqi819oJftE6bLM\r\n2fVld/gyVHaUjkTe29+hs7vPC655iCq+Qnw=\r\n=DSZn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"file:../akord-crypto","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.6.0-rc1_1666281017930_0.31840737076412995","host":"s3://npm-registry-packages"}},"1.6.1":{"name":"@akord/akord-js","version":"1.6.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.6.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"af5365a82b723e94fad0ebca7251cd02d0690e9a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.6.1.tgz","fileCount":75,"integrity":"sha512-h/c4sCxbDOxG04XKCLOBnhL9CXtIsDenGWhJarcsG8KXteL98nl+j1B+r9pN8uCTzZps43/UYU/SaFDmtMEIiw==","signatures":[{"sig":"MEYCIQCuMClmwD4GmAP/A2YRct5SL5MMabiQjd3oUU6dn9D/GQIhAIg/r5CJ8+vor51gdMZ87ix5LAylruEOpNUo/fXxvk3j","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":266896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUW9BACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo9pQ//ef+BMfAnPN1xq/93sCCMR6vjSGzuNZP0mwnMkQi6nHKfXRes\r\n8VbcurDWPZ4cMmOmCrZX7ew7MHLgLS4aVcSDKjerD/NJInU9uEKPfvl+vBku\r\nwizNHNqs1Ge98F+2uIVAvTk56o9lRaphhcEoui01fOHJB1uYm49lwMWJDIMh\r\nNhKWn7xKjXyojJPX2wg4yLQUWNUzpPCveH+LSnzrI6QSIR01AtmzyPVT/+D7\r\n9PDK2TtGCP6Y/KfhwbrVvwzDJgd7bHxyyCw7Xrf4lws8SBOOpbgu2C9sAvj6\r\nIUYFzWgNSZgl2ibhT7LeOqxvqH6QiBpGJTPPlXVXU3y3NP2p38Ok8mhXXOJn\r\nf+GHUlS4i9HVV3/c/HB19vX97jgHkYo1WLrNVZHSowZdW+moLw9FkDi09jUC\r\nkwYZysn14rrqpL9SpkVPBG8f/gg12kNIAKFbi1JvR2uErl9nBPyGimM3nb5i\r\nTQShWvwxAT1/nDTVVHecAeZkzPJGhZRGHjP++Jq31bOdLqk0s53wwtopHuU9\r\n4z8kx5GLIn55oi/TjALDFiElt9KCoa0AfJXEaqFuiG4C7/vuED7P/WwgUXtZ\r\nX1h4YAAm5Q554MAa3pKcT2rumQFrQt2JIhJrF4gxRJMdJ2oRJ9THXa8S5QZI\r\nWoUwjkQbNcYpifAg/TOX4GCry1ijCkelU9c=\r\n=aZQd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"62375f5c29f3baa2cccae80a1485331b58447689","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.6.1_1666281281312_0.007720327763432344","host":"s3://npm-registry-packages"}},"1.6.0-rc2":{"name":"@akord/akord-js","version":"1.6.0-rc2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.6.0-rc2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"46d92659b4ba8d28f29bae1e7c18835c11d9ff82","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.6.0-rc2.tgz","fileCount":91,"integrity":"sha512-7PwSgFx1d0nBsDV4nF5pj3SS4HVtPd0WZbtV+WPtiYGOIIBPbC29rL7EI95h1Hv6WvBF2wJF6V6GvucCdq0mnA==","signatures":[{"sig":"MEQCIFNBjqKUI1YA/Nl0EiyhIK8GkdVx81i+hTXqeYBm2NJjAiBdZr8dS/yh3MpMs2v5YfB4JGLjU7cUJ6XjA0YBHltxag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUXtYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7Zg//bPPyWMnngZD8oBmec0rKLOqznvJ6HTkl30Hm/Z9AuHadKCp1\r\nM8afzcsU1so8bZ0WS70Km6ekP5LFbalRq6t8n0yXl+kMomF/T5h/MJ+sl3tj\r\n/KSZS9wIVdXKw1BwGX3Ly92tI/bWPI8SuEFYHXYny3B8q6FA7b+EDSg8nqGf\r\n4VGVKdBdE+hqFH42FdqkF7QC6szJBB6iNukODsqZOm1v+tu2dEgyvkiNiCyg\r\n+aCgq3bHgVdHI9xsehdLo2XZqi3yoVv4hEfXrMtc66aJ0LPzzs0KjyKcu7e1\r\nt3qvEDDBpVAgZkEiKp6i0WlzCQJiDbjp5cvbXLQbsEiknecVT8zgA1Volu2A\r\nAhzQR7RStqDVNE6Ii1l0UfKYjJau3T9pVpY5J+Jn8DEv4Q29Y8sKkAu/ZvKX\r\nyv++valaF8CHW++ReSVhHHg4FQskoVtnQSZOoinnawxkwPlDAhS8XQCUmt2W\r\nlRSEcT6RVXX/8wzYhaWoqUtifetHl/0cY/aiX2YwJ9RdG2PkxPAZiqAsTpze\r\nDSotLvl/1+lFv2UOuITkqhT0xFVPM1cMFpTOTrMNXI+UNxemCFcR+cKrty22\r\nipCWhLGMUfyyvTUHDxiWZxdZrA8acHisLQ4lg5/Q/wNI34mTzD6YeQ0uxecc\r\n6pv4JvDuq+9DaW0hvdQZrk/kTatW3s74QP0=\r\n=UVjk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.6.0-rc2_1666284376159_0.24114973187210054","host":"s3://npm-registry-packages"}},"1.6.2":{"name":"@akord/akord-js","version":"1.6.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.6.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b7fd06f20d82f98d05314d9ad4ac04e3da15d040","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.6.2.tgz","fileCount":75,"integrity":"sha512-5X3t6Gk0juykq7fihTe7ikjjNVp1mbwrsMY89stX3niCIXmNYOfBrAISd3HkNtjoN5AH88O/Wxda/bhyczaNpw==","signatures":[{"sig":"MEUCIBM/z4/vMObzJyxE2NiXiIC6yYVjx31bmLDUZS+HZZzdAiEAshu5iYcQKxjTAiiEry0u+GlN5H9LMOIg0JyLJgCqL1A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":266356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUlQcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmreQg//UZ2XiSmXj7nAodsXK3ZoWr40m8Jn9PKixaFRiJ8nDrNr1+CE\r\nYhVJf+a0fgW/9IO17+1WZgpfjDcdB5+pVczpoxeBi8n6baATFUnoY7zlb7ys\r\nEB0OLBPaAOdTFmwdKwDSN4iPMKyr+LjwAC2vmWhPVfPD2jSIGOiMfuEpTCLJ\r\n7UQwD2/nE/LRTioz5Y81/WeTZTT6zphkbCE3bLZg6TQQMG6l27lFdLnaO5Mw\r\nr8qy7rRxYTf/Amk6EbLeBpTYoriZA0h+icBic9CZH7yZyCzOHsRFH6YSTjtc\r\nrVOOvkaLHkrZgFgIajEMVxpNiM+w/LAaxxsFoteCIwTwL5s24CRQ6x7r/iO4\r\nhc2RKAgPIhG5JPeyQ3Tx1VixB69QH9Z0b8MP4Bh97whiiqBtf4wy31KGzEOJ\r\nsEsjlfS7j3Z+vEhkmwGEZXu5BR8R3wNawT+qGR/yyk93aICr5nEn0M9GHVGD\r\n8lw+Ntj5Q88qp7u0R0sytbzzxVh8QuRBr1Uif+ZhJotidSLkkRkVSUaTCxU+\r\nWl93UoBm0bGtjXErZq2GSget1R7ACctIOLnfAGPr1hIrwvy31CIZlHzfE7sv\r\n26oKEoyW4Wsjc9ysbd95kgVeFrHb6GjhX8CCbeAmYOEYvBsAR564LnkvVSkg\r\n0vWlHsbLbe/RmZJlqO5thAYR5qWTm2Zq4D8=\r\n=yHtl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"2ae733dc416c6426db012f2868eb85e4f4643318","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","@akord/crypto":"0.0.43","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"^1.0.7","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.6.2_1666339868684_0.880658052519621","host":"s3://npm-registry-packages"}},"1.6.2-rc1":{"name":"@akord/akord-js","version":"1.6.2-rc1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.6.2-rc1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"152dcc02987eeafef6ef3004585f92d69d4de6a7","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.6.2-rc1.tgz","fileCount":93,"integrity":"sha512-9qqsblwXmpYjpkxW4m7GulZFmh5TU/DJPm4s7JTz/cIdnWgLXK1LRQW+4itgrmPcKJSraEo9m+hbrCjjDZ9p9Q==","signatures":[{"sig":"MEUCIChgNPR7EzVWpYTkV49owwvR/IiCzhi5hVD08AtRrTbWAiEAgNoJgcnreQswMrb9d/Yo2ViWb/fM1XfSROCvSpGwGbA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVq+bACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmop+w//VWvy6gVbTHEq7qhk9ZGEwkgvBcvKLtzF4sKwCREt65FgH7TZ\r\nCYrloArM1BKPKZUUVsqVd1SBe+9mOcLFV/I71Vi4t+V5wuIwAnCTGnsHdYVB\r\n9iR1zzPurIEAZPwemoaye35G59iI7OPODY1UW47kl6kz2ao4To1oRutZtmT4\r\ngSyWAfljDdW19Dk5A9cH/N53C7TWdRNj/jcZYYq6CnTjh+4iwm+yduktUXVP\r\n4y+wgaKa9803Wr2usH1Xj3DiOsxKMd2R40yDpktbb2IpnZPuqelSUETSKCBZ\r\nEEtmORmfQLfGMqfrdUHCe0CE1L7yTGJwzKK0RLEo3eBBVA+kbV/LR9qySEqf\r\n0WG6/dyFixlj3PNRU29n2I2TBBYrGhT8AjhdYLjNqLvqcWfk4uZvamycehAe\r\nN60sC49n7NCdYaYn1f4A5My54cecG6NvmGdZMAFNpvHDDM2MDE/zNsBnAz6r\r\noX+wZ1n8fXLjeLca7Meks6j8tG29VtWx+evCW9XFSroyjciHcaFTXXqX/xjS\r\n8Tc13R5wreVIzc7meVPzf4+Znbyxtm77oUx+wy2edL8kqBzuQ5T2uH00My4K\r\ntAYsx4v0vnQbXy+jPvI8vHkAR2xy7lOxcp+7hUalwTtAHr9CmnuELCuPuTXe\r\n74LGoiQwpM0q4kd9uJsujSyasdUm6QeYuLs=\r\n=RoRP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.6.2-rc1_1666625435154_0.028285606770741323","host":"s3://npm-registry-packages"}},"1.6.2-rc2":{"name":"@akord/akord-js","version":"1.6.2-rc2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.6.2-rc2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"2a3252ab1a2de4db00ee96d10df054667fc68e45","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.6.2-rc2.tgz","fileCount":93,"integrity":"sha512-u4c2AbYINLDi9z/rNv56MnaJuDmw1Tq5Ix/omKZkhi25tJrXYquaizDH95G5VzSG2yhOZgbIMs0IN8HKn/n0GQ==","signatures":[{"sig":"MEUCIQCM+bOfzCKvQnViC6Iou5O7IM4Zbsaiyfd3fIpsP/Y/XQIgEZIFMJjGEruDBuvMlEOs7fVm685YTVUAuzBwVhPCJRA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV9GgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpgXw/5AU9h/MkScyQguMPH4D7be0zK8YAtgAXc+uLkOomHaLQKU73g\r\n10PjOj1gSajyvAt3SoVJDZcBD4kr2fJJ33qhNqRSPA1Jrt/Fr/+iKScoUjHN\r\ncPWlUu8WMUK1mgI0VJzR+hKq/X34kN6Vs89B+RlMN9rYx4IcqwJtCKABDCfS\r\nKU9+W0lg6Ado60/qAfxSI8kefM4BkTrvpztp14sPJVLSn+ksw9SHlEB0bcCe\r\nKFd1vsDSn2BMdq+GdIL8E+jhJAY70wqOd6mfFUyJTvW+0U/Er3/3i9+EoZ6D\r\nya3iHOdMxTolVwHu35qJEXq/AFsljIs9FlvYSICzhu8kZJVWpXgLKB4mLpRK\r\nMYfCMMdqPiDP4IyKrQU5r0VroP1ywewil4gQ1HoeHqcsLwVevZkywCsbpvL7\r\naHnilPLv3AA1SMwJJPJpw/gdNu3FOmtdD/IzPaMMjmqSI4tqYJ564C+tjgu5\r\ngMahqgjLiOOdk5B0oxgKkUZNumdC+LDz3c/QqNwzPtL6/KzuEK5ElAFpb3Yb\r\nrbUfB6JhDFajHimVicKLN+BkHcHWjBWvX8U5y5Jywo4aIysaV8cziNsSD/sV\r\nt6pOx/w6uPWAKAPHQsaSCjGUAeiWm0ofp4AjjOEyjveHLtHFz72iHi3nWpFo\r\nZVFH7m45Ms4Shxt9h8BOSQ4nVqSP3H6fTqs=\r\n=Xem3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"Akord Client","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.6.2-rc2_1666699679848_0.38921702954340653","host":"s3://npm-registry-packages"}},"1.7.0-beta.0":{"name":"@akord/akord-js","version":"1.7.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.7.0-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bf43714c1fffb9b4c1264382b74f7cdb68476f0e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.7.0-beta.0.tgz","fileCount":85,"integrity":"sha512-ujUTOcaOzqgILecCUu/0lXw0HjODbfNUCbjHAFKqoKsIQN1Swu9w1n1kYHjNvjn/sanb0LWcLMZeYFKxMOcyIw==","signatures":[{"sig":"MEUCIEAjwK74N3Wqc7jo4KerH58WiSU6P2P/uLofrlpRaAJEAiEA2DV6QA5qMh5EeSfRBRScH3CCm6k+Mdw46jyHhYzTttE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282982,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYwrrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBFQ//SZSPdeEWNnpzKbY1J/100g8HD7fVyWnt/7ay5evp3HoMBFlA\r\nJ4U7+ki/rmBSfnN7LhIGmRT6LTrUem2v0NhM3mOteyPIRGZce+pSnDi0UZ8/\r\nE2A3hynqEiRmWMoca0BRA7tunFB8P1EWuAR9euQj2iztP/Q0/TkDTigr99sT\r\nGd8WQkaj2pIc/qXWyRlAua9Dby5MxlIhLpPCE/JpPlff54lnt4stCj9nWPOZ\r\nrDIie03fgZ3Cpph2nBjkSO9ny50ifl3Sdjtmxh9QmI/t5GrlZrNjDi3dkO1S\r\nbUt9BMZ/MOUY+LnUB3H9kF1FTd7lchDmD5CofS80xUH7MPYWRhEsQPgM0rqi\r\nC4MGlyFWxg4KStz2kvxJhz5fUeGlrm5/nHo3OqT84jezzwMoP6qS1XKGO6VK\r\n7OLtMZ2QSfdMtLPmCCB6dijNXy47Rvy5wkcR1CIwwKqtl6BHLKuXREHbotVh\r\nleTWqjM7dyQPqUGsPVtUSouzYYC5ELfP+O3XmYN0b6RRFmR5BcQhlNddDPki\r\nfH4AjsBKqsdR3YNI9wTNT1vj3Kh+ZzCD9mCMGW/Dppu/rp5Dd/CzF++doyzl\r\nWDtycV99xyp4vZ+yJ1R2BAFdShxeKXLfd85QAlhvGcfpmULa8o7zGC3lVu4z\r\nm6s/z65NWDd4zDDHywnGyJ7WYBcoVqtpHjc=\r\n=qI3j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getFile(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getFile(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { name: fileName, data: fileBuffer } = await akord.stack.getFile(stackId);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"4a39d51fb621b489776512ea58601042d0c407f9","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.1.3","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.7.0-beta.0_1667435243350_0.5101260347546976","host":"s3://npm-registry-packages"}},"1.7.0-beta.1":{"name":"@akord/akord-js","version":"1.7.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.7.0-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a41a3a10521efa26930764403209de0e59b05526","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.7.0-beta.1.tgz","fileCount":85,"integrity":"sha512-V5sUIcZfrL3NG1e8Uol3aCtmkCIHaqiPsVZt519GPl6F93Og7ihK5UqZJTxQk2p8DgE7OimRB//BVLbL0YdBCw==","signatures":[{"sig":"MEUCIQCvatEwF5nIbOiihIiI2okPP9f9XveQdZjUNVcw4sVaQQIgWNuVGyR9wZrQFtcdMraF9kQy6BPYGj2Dvh/35lB/RpA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZMnDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo70A//YoXnmnC9HpepkYl2Pfia5Y2DcY49E4uglVEE/S7Dzhf1TUZe\r\n7iY8H5iyPnkXBP6eRffG+5e3d0N+566l/z9I9PbazboQTeAsUpIfMe+/Js1O\r\nvwv0pPiGn9EQB2DrmXiYttP7bb85bm89sfKO6Mk2g48X0SJEhVIODNowTkSQ\r\nyKsNII8lEG9hqU7iF0BSKtekdRN1zKVrMZKDMlhkDLe2EH6hidHoyHnJPPeV\r\n4jAlWZ/5lpLOPc8houBlcwv73i7CMNxTa18/gb4TzHQQsRhqoosa5hlckEvm\r\nCcLD35ZBeW+8WE/ArNk+S7C9NHcZZpKkxQDgN462MiVzN6h2S8D4Ip2udT4R\r\n+Ok0s3xMQytJvcc8EchWKoUzvGeBBPzwOvev1ylFd4ekvepZpFCLTQGM8vaG\r\ntNHJ5D3fHycxfUc3mgeGxRG80t5iUdj41/WbaBpyqhLrwm3d0/8LZMyxBO0e\r\nZg9KKWx0PvX1JAujIafSH56a/U/JpfryDp5FQULVzLcE4UseCP50oX9QH70g\r\nzbwLC6OPFMjyvHpsLAnX3QojBivUPwkf2P9DnarAml7/lgu95Dpkp6jB7dhD\r\ngdxNN1shD+wrxchpuMNbHzdM9DQJxXIw/hRI0A304R9U9W4hDILQ3WJy48Uu\r\nAwdRojua8H1bwW4x+SwJZDOLdWXZtSIUwrs=\r\n=0l7T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getFile(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getFile(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { name: fileName, data: fileBuffer } = await akord.stack.getFile(stackId);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"6de2f1445211c70e5abf99ac921437dda80dab0f","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.7.0-beta.1_1667549635305_0.7004343632140482","host":"s3://npm-registry-packages"}},"1.7.0-beta.2":{"name":"@akord/akord-js","version":"1.7.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.7.0-beta.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3d9f540b712e97118e55e047b145291098e5af77","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.7.0-beta.2.tgz","fileCount":85,"integrity":"sha512-J+iV5XQG3md5KACd6QVSgJgjwA9TgGwngyM6cPuGryUeplXgsKIILNb2PUuhQLf4wwNQvFNMNaaV9tSXemu9cw==","signatures":[{"sig":"MEUCIAeeV/oLrAIT6aY7wPEPRvU3eAXIdHygzdqw0jfFuP7NAiEA1NUAYC3KTu/8PeZ0WusQ1c2mng9kbwfDjhzv4i8M3MU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjaQrsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQ7w/+P2yuxXBOgwXPv4RRA/BC0DMd8zBQ96qoUrRSuT7U4SEZHkiJ\r\nHNmdt9MQeKf41SkX80zdREVLQV5SqB12usa5mVnTUKqXfk4wzOwRCZsAGS3q\r\nU+2Y5cu58lvdi5ySW3nWouXA0xITStjFqAqrG20LqGi3UfTMHe193uxf7v3g\r\nOL88rOEJPdxLwDPNDE+jJrdzS7JMkGlKfGDrn5r70RzQNC3LK1Flf1Krhl6o\r\nejKrI2RDQXQgQY8zYN8dHLg7xY1NsGbZ1yhbln3yQYgk6eGr9U8yuhHozOQl\r\nVTYNJ+AcrcVWAW77ScF96wbk9A/dsJkcK1PlGN10HMrnf1L67bLra3sTSaju\r\nFdAGAxyLM5w916bB0I0HItdwHmO4MTnMFo8+Tcd8ajSCvxbZrx4d0tznk7l1\r\nGCrl8SDvF+A0cjtLotszsXTsO91KKAUV4o7jdTofkP25uiiX1ohVtGDPQcsg\r\nbMC5F2gbxup7l6sPgvYwED2CD1SDOkzXbCiAwEiVdBDokNYPQK3kiE3fKQ41\r\n+T22nSAVqBEZG8ZTSEZX6GkfiUEm/0+5Wp+kB7VUQXwGap1zKRdm2z9kZfWQ\r\nAa+1E/J9tIeSC8ckteMjG89fsjCXU+L+pAOJvWimKme4B9QoSCIJ89CJOq1u\r\noe96xnQiFkZ28ihEllCETmXIPuDPpRvgwnk=\r\n=0+Og\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getFile(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getFile(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { name: fileName, data: fileBuffer } = await akord.stack.getFile(stackId);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"e58194ea5ce256bf28aefc2aeceb92b9c2cc32bf","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.7.0-beta.2_1667828460740_0.9067148470561952","host":"s3://npm-registry-packages"}},"1.7.0-beta.3":{"name":"@akord/akord-js","version":"1.7.0-beta.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.7.0-beta.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6f88e10a7086296cfc1c8c8f8e3990dd7476dba6","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.7.0-beta.3.tgz","fileCount":85,"integrity":"sha512-DIGhmpY9FZtnGkfHlAk4N9kwupKJHRJUiHTSkPdLpRAJzIkWU31ryLMGrU09I/v1FVnEY0rqf5+Vbw8jSI5UNg==","signatures":[{"sig":"MEQCICnkoYd/SWnPZ+kjFFYziM1XjeYgnHVABGvhEVfUyv2BAiA890c4jiQYMj7CxhJ31KTQTNGrZVIrFV+CjO/hD9MDjw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjaVsSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqUQg//YoM0wnd9grSYxmkwpkSMbcnqftZf1zDuvHOKw7XCvqs/lo3M\r\nCVwUr8wbFeyfU4OpyaiEaAGHd8p6AOtcBNphzkYsBdSD7Zkbzq/DJ3RLqltC\r\nNwMRnzM6hXKrsRhBNxlxvLUhAb2rFowq6IFOOMUqXN2BkBk/XqxD7A3e3+IH\r\n0nKT0jfSH+ATnKee2Lb3ZRifMDwkINf4O9+tUl5N/XrJr3qQn0M8DlWfyZRr\r\nC4DxmwbCZjmLofpcs1V/oeb0wQNrbeogNZekH9Fsp/oTqA3TzJ6i1K4W/fDx\r\nv3H5PA6z1oHB89mENqIQs8H6hnVivl22asJ+QBROhZ3KEMEGNQgqGRk4jYZS\r\nrUsrwfC3fdLiBQfnQhYjfCRsDupMRfSUDrRgQCY4MZM3Qi4c4j8q7hEnClee\r\nLSXwG2DITaCJ4DO2XQ7i32O9oaA80fPDWg/h0Nf7/JXaYzdppx46KJGHRchh\r\nL4G349JBx+AMxh6yJyTqpvG6YaADivUPEUPus/0wYn1Sql0j0xObR92ML5E5\r\nPYy5FWQowK04rS5hYTYZbV9GYCEX0v8+1OqFfaO/o1TUTr+W7C+3OYhdrS7o\r\nN8DXhm6y3gPAHVLBwXndZuWuhpzoHFNduLDrOzvREPG1jtaPBl15QrrZ3c2b\r\n4GMDIpnTPhU/57EyxPg6Foa/ZAe0sSqxUog=\r\n=eyFj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getFile(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getFile(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { name: fileName, data: fileBuffer } = await akord.stack.getFile(stackId);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"e58194ea5ce256bf28aefc2aeceb92b9c2cc32bf","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.7.0-beta.3_1667848978017_0.9002440235755778","host":"s3://npm-registry-packages"}},"1.7.0-beta.4":{"name":"@akord/akord-js","version":"1.7.0-beta.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.7.0-beta.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e12e2471330c9805d3014fdaf114746bdc103a82","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.7.0-beta.4.tgz","fileCount":85,"integrity":"sha512-Vc5HgowLDF8sCOBYIEENPVo+C3CKyXdBUm3GtzZRamhmxA24l8j8+o3yayXXBpcLGMsxHBJYoWYbM36xj7TyYg==","signatures":[{"sig":"MEUCID6HHuSXL2wmTSWsucezAK612EG9nclRFZgs3FhMtVxRAiEA17UUjdtfU/gLFIibXGhPVKiO6269mn+ARCP61sqA6Iw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjaVssACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpagQ/+LDfIyIrKvP/dV+vmxer/cGc7RQ5P+hD0ppIsZ0c3qGlbG5yb\r\nygHjBiEJ5md2fB+HP5K6NC9RMCtbzwlYOzOvB2YqLgOkC6e9BO+w4EZh1h/f\r\nE21OJB4wJgLOLSQBARZichTOOjppIem23OI1Q4xL2WCNBw3sQzFEemRqQkyr\r\ngOmJqjIEQBdMI4cSV45QNbFPhcH+rm/94MNESHEi4I8VB60ieqP0gUMcF/Gm\r\nYawK3wxgXY691VnOqBaNUuxIClYQ0xQjwQCufUSZoRJ8haMbhgK0bsQss/Dx\r\nxhLo4/kNRkZ/jHPOMo1IblTK3Ku6HnSBjzsecddTgs3j4DUomCOTSFUgiskl\r\nuXkOJYjSPaUN4Vu1YZm6Pa/eIAzkko0KgoBsKSWw964p4faq9wsmiAVCV/gv\r\nlS4FYeXMw8mneIuuA593wrjphwfqZdG+LLjo55EBJHbchgqjQud50zzmnAe4\r\nS3TYbqbFPqkWTJRFey3vC9KKNdUz/NX9gld0ir+Ab7CTc1dL4Mz6N2gFPGO6\r\nCmXoCSvjahNB/rJtqET7wxHaE2jxt/mrmUzb3GVhAttCAZYwKtryoTNYdHaK\r\npIFQszy4IwwBu5mW+XXMKnIqWJVH+01DuUhfSdeKp9oeTWbaypx5Ew2uM+DK\r\nSggV2osUYKcxfWBW2jxcrrLjfTSvw7v1+uU=\r\n=RhwR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getFile(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getFile(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { name: fileName, data: fileBuffer } = await akord.stack.getFile(stackId);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"e58194ea5ce256bf28aefc2aeceb92b9c2cc32bf","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.7.0-beta.4_1667849004396_0.6582386628458974","host":"s3://npm-registry-packages"}},"1.7.0":{"name":"@akord/akord-js","version":"1.7.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.7.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c7547546d4139e962ba7d9821568f8a51649d0ce","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.7.0.tgz","fileCount":85,"integrity":"sha512-NVlxBq6o6xYlh39+vXllGl0fHzkYyOLTzpe+Rqj759LnxOGx2d/igKDTjwTcPU4P2BmE9MjHz5BRx7CU/HkWyw==","signatures":[{"sig":"MEQCIAY8a7E8X9z4r7cMCu+KsGE4tGYLgD3acPsaGll42KgFAiBkObebt0DvhtpXUsQ2mcV1b1g8r8iKTPNtl1RxdR9hRw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjaYOcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtBRAAnRB6jC2A95flL6/FV6mM4xhsKTLF/BtA30sFRQ+WR40hFMqP\r\n5ikef/w1QDS/47PjkGBtQHg0guWWj2td3h9MG8wLFU0ky6eyOZupUonohYRg\r\n81X8truLdvZUJT4gVMfQh3YhPIAPsOv8W/MclhKIIXNzm1KaBIA3RW1MPlLQ\r\n4mXD8nHk5qcpgNF5MV6O6sFRreDJXC67zrY5pWC8SYrHj3EXTjk88RjOPt4F\r\ncDD+2xfMo9TPn/JqeD6XxRqkK4m7OyLG+bMFBUHJNTTWSIDinSBx3tFGDeCH\r\nArtFZeCkXHDO2zSKQMXNtEBTqQUmiVrgiYd42J5PVa5wbc9q42eU78BGN7JN\r\nPrK2p8/vqtDu0771xn8fdorjNjtOLHIXuSksVhQH15ULZtONuydnMMwp4p4V\r\n7CxAAJAJo9SBQFqIdIjguDQquigrY0St/xeIecefSfMvb7oAhPPhvFiPdEzE\r\nm9/4oSIDx1ms7VQHPIOO/InKydiBk+aFNljSa0uHtuRmpeZ5IeKOKj+IDCj4\r\nm8FqVrEajr4ppWLV/RBpYMJ/dbsX/k0WXU3a9DdZNQ2ZazGB07YKs73ep2Ch\r\nlyYJzvHlr5zD8PBC7IZHixIvmQNvkGGpwY/Jb3kbWu3m5n1biiwxANgtBXra\r\nvwIXHuHrr1oTU5dgHvzblBUXMg7xvAxwbeg=\r\n=V5OZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"dbfc69e9054f0e045ebc396401e2c4eaf03e4719","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"Akord Client","directories":{},"_nodeVersion":"16.18.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.7.0_1667859356321_0.37806454270536527","host":"s3://npm-registry-packages"}},"1.8.0-beta.0":{"name":"@akord/akord-js","version":"1.8.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.8.0-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"8650c3a0af391b672d3305d3eac34adeea049f3a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.8.0-beta.0.tgz","fileCount":85,"integrity":"sha512-+FD7wLrLA432PcddSkS/XL/SDIpaKPTwEUD15dgU7oCmdXaOD/rL/1OvIRuPcaiKcv7OxUc4VyWKf8fNwrm3ew==","signatures":[{"sig":"MEUCIBPGqfLURoPI7WDd24RXM0KvWIyWepDxEc3L9xZLMkePAiEA43HaTHkjCPbDzVeE+BOQyzn+CGwRjs+6q4rtbdMoPho=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjam+yACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr1Xw//a+Gg3dE9/v40TRLFc7MWuYQpzmhl5EAdSZ0g4j6FgWqXc8uL\r\nU69s5ki9+Ck7lReH9ZVjrtTXusc68MLYVh5HBHdoSom1m2U+aItDfgew78lX\r\nZtb6TdQJzu3VqhFM5i2kqI4Hjo0Ptp1tioEb1AJbA2RAxqpx2G775zDjbVWy\r\n4mgZLCnMT1xiFsQ/+rXSTsWvrbh8ndusXkDtHC8jUC/SF7XNodqKWju/QuiZ\r\n+y5fRziWdqBZmYXshUwWZpheKNibNz+i8KqK/mr8S6xkr2FEZ6tqN7QlsAJZ\r\ng1lpRiDmueWZkMgZPTMGkGk/5TSkGP7cqNGlLzEsApm+By+qi1IsCI1pzLO+\r\n/5IB4xMSg/3LlpmcqgDXj6a99Wp8y7BBvS5sJS74D1ElPXFYfxYyGmj7HtBv\r\nQtc2HPH/Pdz7tsvZTIPiyaEsw2P0uPFk9x6Njhb1fOGSBe7Ga3BnQH+rlyjA\r\nwetFmW+WZVWKXYx8wI3169ewSLsht+6bsKKBBccVcu8LdAY8bMMmZu2DoLWy\r\n/jh0LhE9goRfHNILBwuQQizn7quAp6Mlu3xEnaDMd9V3EDZBUy8OrFq//Slz\r\nPNHL2Zbt+e2VEfprFzplhxIDt4ATJUPD0UZoEzfT82GbnYQ7Z89TeafGT/xO\r\n9LebSqf4ZF7uRXX/Sc7bdxJ9OUNcx+6SDsg=\r\n=C6JY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getFile(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getFile(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { name: fileName, data: fileBuffer } = await akord.stack.getFile(stackId);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"dbfc69e9054f0e045ebc396401e2c4eaf03e4719","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.8.0-beta.0_1667919794657_0.5235188928586096","host":"s3://npm-registry-packages"}},"1.8.0-beta.1":{"name":"@akord/akord-js","version":"1.8.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.8.0-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1b7c5e901f4900f258af010557fb83352e8ce373","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.8.0-beta.1.tgz","fileCount":85,"integrity":"sha512-zNcWYXxx+3uXoFCuGo6Hys0LBx0nx/jjoodDf0iBDchdl1Oxmgje1FNHXYOoyIK8hcM9dKQAh3fzEJ87LkJ7Mg==","signatures":[{"sig":"MEQCIAowgiVeeCA6pcP6xo+iWDIh3Q3z+p+fbC6yLsqlpmaWAiBLGCk3Z+cNekchjNjAofbEuvo+kYL8vNxXPDs2ZFQd6w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjanCeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8vw/+LeueDHvChuDLbcorn/AyDkjT+y8nN7DwBSWPQghQIvT5fQqG\r\nrV+3LvrOWOpu3Nun2QFSL+BjdUiEEc6HuUxjANnJ+VpWWYMEwcJl4lTCI7Iw\r\nGVa4ULD5t3ottA7nMWCwmyqu8zlxKz+EORc4ACdOhDTslMCUIWEe4ArJHcps\r\nnqllWp7L2bMF+MFn/4pwXI5R84EECK14DshiYeAK8fEoDnJ1HH/YKqOGC9N8\r\nUOSYSTFF8vl11QBGU3BUcoVB+x0IoMBQs1GQunr3C4VEaNWkd1HbaADftDtj\r\nx4L87HEgPO/nvpKSI29Uo8t3FWdY9O8kRBSjfqJ3+Myf1jf0uLvDTH4y44yJ\r\n8hkSTPq8aam0Z9jOvVe0Rx5Lw1e7253KKsnjEgRLkY7k2LsEO0VgmvPNt4pc\r\nDID1TftXJpYrM2HNMs+59JTW3BUwh0uqdKlBGTXx2Jzet5IGN9dynPSp9ly1\r\nz1YcbfcBcg6P781/bfLH5OwwvP5gUpLEZFeuP+J3GTV+FzllAfsoFfh5h1nE\r\nvx9lqkhuXAYpC/PDG3dHogyUUheKZfnlV5/Ujs8hIVS1/dwyfoeWx9UtODuj\r\nrPMdoISjk+TAL1gsvcV9uRAZpn+46sPCSWrWFvUeKiJj07BiZHdxN6iprGjg\r\nB6qYjLARIDk6yeH9UI4FYfhDj6Io4Vk2/Nw=\r\n=s94m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getFile(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getFile(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { name: fileName, data: fileBuffer } = await akord.stack.getFile(stackId);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"dbfc69e9054f0e045ebc396401e2c4eaf03e4719","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.8.0-beta.1_1667920029834_0.36903370480467945","host":"s3://npm-registry-packages"}},"1.8.0":{"name":"@akord/akord-js","version":"1.8.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.8.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"0af6913e4e5e6dd5c9d748f3c21752751a2587cc","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.8.0.tgz","fileCount":85,"integrity":"sha512-FuViX1Z0VPD/0TAT7uVbImm1xnBRGs8VL6oCz5FWZXNVXxt13Pc6VYEEt4TOstLGxTsMv04O3IhO/KRtb2IBPQ==","signatures":[{"sig":"MEYCIQDJgVt1QH2D3Q++FBmJrOgJJRHHhHefx7b1LqRKnbC8XwIhAL+/cls8AAkeK6QFQI/Oq1++tWToXirZ8d+3vWAk0jkF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284454,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJja4LpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVMBAAlyPzxJnVnbqlB+FRc7BOLU9lR0ICdV7LeZKRHTu+3l0t4eeu\r\nrp1BvzkVoILTHkpXVlU0BsUGUuagjinBLcr5XYU4D57aqGnZ8DF4N0lMACRW\r\nKUneWWzy0ira0KnAUZFjhYkwiMEQdYir6V5+1IbMFjDdffDASQY838znK9Qx\r\nw7VFQ+5OwP8HsxWKlsunU+ZNCzTt3j95xVeGBSCEi89zIIPYk9RQlSRvONgm\r\nFrdEb7U9QuFU7zZA45/9moXAjtusp+1YuQ/oaNF6NkMoJ9uCiUI6+2vvCSaY\r\n2Hv/XXcwdSvsx5jI4RfMrdQ7MJMyAY3gdanRnZvK1iVei2ewKY3I3KJN9v6V\r\nDuIrNUQRlkpDwJuUr1qAAQlnS/RWq32cuXrlvD4ZxGSE1D0zHH6mlIZSEsIN\r\nnSfXyN2oTIug5quPACym4Dn9bs69QgvVeAdMGmV+/KDNo73okAIinAT90pOU\r\nNKfE/Bx8Vqy6W3JT9Lu5XA+/NxQsEnsn9bKar3U67qNSsjSAkvck/7VSBowj\r\nNAvw4TdYsyfaPeTFRm71kSezCCj4S+kXiF+HZDMkYyFbFV9NL7DrTxWGCyjh\r\nBRW0DK8WvSiiKWez8GDDEDxJVuRwfHitQs47jcwpFsvlqXpZv58r5ihcqbm3\r\nZNsILHo54itTxTaC7i7b3WFrYKJVzJ4Bqb0=\r\n=Br5s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"899e7602ebbef4f33df3baca526fae330c47ec4b","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"Akord Client","directories":{},"_nodeVersion":"16.18.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.8.0_1667990248938_0.7456161852048264","host":"s3://npm-registry-packages"}},"1.8.1":{"name":"@akord/akord-js","version":"1.8.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.8.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b8e442730e7d5436dec016d80d3b63b65f436bae","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.8.1.tgz","fileCount":85,"integrity":"sha512-xUEyh7dHPk3AE3v5Jt63TVebSqQJ5vsC2rwGmBtJVC6SkRAatRCoIlku65GUSuWVJQILoZ2HDvSC/Q72canjMw==","signatures":[{"sig":"MEQCIFXyxIAG4Nyn1+F4r2uc0KBVqQKjwhEpLQEr2dU870f2AiB5uRUyzmVI/EFndXTR73eKcUW/N5Kw7dQrNiUZGyIyvA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbVY1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr32A/7Bxj7lpFCBpEyxWVeDlqUkWzyjQKs3g8z9PxXxhVy6afm4kBZ\r\nA8X+O3uE1mydIBBmoASc/ukGkIUnmnLyh/VPkWw2ub7R0vHtkaPCUXc5j4Q0\r\ncTDV1prHBxjxAuJbpaTHW+wTdHPSLJ8fx1VhXKVAJKjUZBXs6DQVwlWdDQQn\r\n0il2Xy+mKDQouZYrBgfSnYTrwdD4HtyI4AQyhXM1JnzGkAIJXs9EnZccuaIB\r\n0xSq2IXJvV1g9xGUUgmnfYquEURa86+yVxur0Zb9OpR9LlyrQdjQDoHhNqTm\r\n0YVaLVycTOQKrKPsIEcfTCMsAD+x3h4QDfxIdvTxdxl6N2dJjn5JUVbUm1IB\r\nck64DgC52BYOqPVzu3vBrcdKxYkjjh7AzG5K4mjLR2i2ysTiUD/t5lD2dbH8\r\nZPKvMqKgQFge/ztCmnJ3YiCCoqGmxbRVhsBItp+VZ+u9N/XM9Zv8f4DJW+Su\r\nMT/jgYxNY9MoHtf0yMlfQwDcBMDxUwOiNQ14sm3LP0JX+soZj6491L7L9OB4\r\n8XDJa3ms3UQ2J8PwqD9kZCxt3yD9kw4XxyYXdRDwYNZBRJjQQHYIFqGT8A8x\r\nn6hX92VVv8EDIBZ06J/s3vO6bitzqJK9cNpMhBMvknnfrTbHvjLD5c/RYp8g\r\n3Q/tuT9+MT4MnqVbYP1Rtalm/5H8I9oeYj4=\r\n=zFXb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"d456df1ef7e08adaac63f1442005e69245821ab9","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"Akord Client","directories":{},"_nodeVersion":"16.18.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.8.1_1668109877622_0.3742882651270576","host":"s3://npm-registry-packages"}},"2.0.0-beta.0":{"name":"@akord/akord-js","version":"2.0.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"aee74e3e1f743430c0cc31378bb54f57670721c3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.0.tgz","fileCount":87,"integrity":"sha512-VUSUjw1fZFCZGYeVJFJ/ZzmOVCXdl56K1OosnjJq1mME8tRRpCX9LwoTgPyIlMkapV2cRitpkNrPWekh2CvJ9g==","signatures":[{"sig":"MEUCIHVtHy8x9BEnWhiJjfGktabz++ryidvsSANaDLoshzGVAiEAiN3G6aLp1fEzFiGucc932K0ZYGQAL4JvxEJtFFhjl3c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdAbGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqu4A//auztqS2KR7wpDY8Y8xlyj/iqw3xqOVmP1e8NobPtrXwGHHNv\r\n6jOIeJQuUljO1YiCABSMd00JMze9M6GpJEen3YvYt+FpKXNgtLD4UBaqy014\r\n0P7SkCEuCZerXbZ/s0z1Da/JYIlTBrpX71EP4NwFsRHBVLSbUbWIwf7QUwfJ\r\n0icGTC+yDrWYtkF0oXt1NXkczObz60/mDiRsrxfRleGQ9aW0VUyipfiYdQeB\r\ns5DkxlTUS/ozfvMKTdcQSv9bopw9thGLHkCIKRjhRvLs9y+r3Xeh1iw0qSyb\r\ngiwbiC62aQsotrlJ3upb0M7ghx61ZMo2UYx55UIAEXg2H7tN9B3vSYr0jpTu\r\nHJWfILoUICDfEbCuVnaKbh8rAkOgJ7g9wUNv9vwdKLfyopvZx+ZgsPQsonE2\r\nvLRy8YGelUJRTHAhT6TVLtkLKpA6gh2rmo+b8vyrGTJOlrh7MQSLHJeSTv6E\r\nTiHqJbPveuQs/sZv9o+rTr6RzyZz+msnarw731Cc5G/XmR+6wpnMLq1d55eD\r\nouOLy+Ii3bMZdxj+vaTZ3XwfHaIXjYamsokFbapjok4XPUZCwLS5gGIkpqNn\r\nQ4HG+8+GSYWUW1F/c2VhH9XBYeSAhMEe1agnSMT/G8NyVxYUUwk8ScKumkgE\r\nUG814LLFn4Yk/SjCi/EYu1niBH7U8fH41F8=\r\n=FGRF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"097a2940aad8c75752010f809500ce239d1e6ab0","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.5.2","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.0_1668548294002_0.8294275916368112","host":"s3://npm-registry-packages"}},"2.0.0-beta.1":{"name":"@akord/akord-js","version":"2.0.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a4929a5f17af17a5498389b6a10d983d8529ebee","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.1.tgz","fileCount":89,"integrity":"sha512-To6+OP6wvfA05TNn5ctQJbOm4LlTYssaq1EWmnLFEicvaGtPKtlZb8IB5HVQ1gEgX3PdBAce7yzv9TPZy+Z4xw==","signatures":[{"sig":"MEUCIBbJcMW7TJNYz1ZE8OOMChQ7Xlh3TZ/nmK3OrVE4KXINAiEAgs3Z0pkC51SMrgrCKs81DCjBAnhtIbTiSK1BDCBoLyE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299579,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdSgRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrvSw/+K9tbXHKRFE3eU1kcveP3cXLVaWm/3DOeQQD0Raq3OW1tMDYF\r\niZUmspeuV1zBly/MQqMkZfnwRhu5EQD4hMm7oj78VTpRFxp+mqnQXJp5To/A\r\n8IGuYqGCuSxDtR1fBoXnHyWmrmUAkfHBD4bfcldnVoGCdy/ocPyFyFNIvJQN\r\nAmpxo3MXymx+zbYEas65YfPcN5yNvBqAnhjy4wjog4SIuH769tm2Ys6sRwqP\r\n3clkRjDGcNOJgsCm0ZgEA36a25BSGswuehvsTyK6VfJ/9HjSqMBntvPUDOc0\r\nGn807mdIZkTVtllLuwCY9lYs5UEkqFPD0nekSbrWL7Vznvr3aBMGjg/WEcer\r\nXJMrXQ1zoqKac8Vmnu6oR4lB7IJ7bz8RPyhJ+DXDtpzsQavXUA0Q6yZ7boIL\r\nSaseOXrvPrPPtd9pHToglo1syguYtDRMkweVDeffdelb3fVAXsC5Rm8QDCT7\r\n9xklvqd6OmbT75u8LNRqnIPvUT1eX+rRyT4NY7R1UCCbBckSxqEQsml5jExE\r\nAZDJzIGMaBwjFPeBnjRELvTIQQqq41g46uJhk6Rbe49Vmg5vQhDf2geV9dFN\r\n6ku4iBdYXs9FzxQWuVR9NWPUPt8atP6UmqXqdvLff5MY7kXkKBIWw9+1iV9k\r\nxX1f5iY41aPDD2/hws8zCJ96rQW/AwsaL4g=\r\n=K9CG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"139d242719b2c4596bd32f24d4857b7a141dc9ad","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.5.2","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.1_1668622353612_0.08673432712240481","host":"s3://npm-registry-packages"}},"2.0.0-beta.2":{"name":"@akord/akord-js","version":"2.0.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a8ce1bced752a8ee6af1630e35cc4d1551d23a10","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.2.tgz","fileCount":89,"integrity":"sha512-vCkmEpc96tQXorlvVpxeYx5JsgcSKMLRegQL24HDO0fMWRUu6xzpR/sIzdmLBXLgyRp9W55Shb4bLup/dXcy6A==","signatures":[{"sig":"MEQCIFfKkF7PNhcFNBmWQha18bX95LRkzrMp2AZpliOwpVmnAiB5V6pOa90MkFkE4QTSEVUYNbcixcXrP9FhwFcZGwcRBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":300474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdi6AACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdoBAAnBIKINm8XcmjVXsqkmTFdCuWLqOdUBoEJliS/9CNHCr1UGcZ\r\n9cCKWJSUUy/gzNpJSZXU0TVEAKR1LnYlsxv86J/SHk3dfsKVXqFZrjJxRACK\r\nkEqht5iDSFhzCdkd4m7SBbBnb8sy75NU0vYFx/0ZLZwMdEfCSu7n8D+W5Nt4\r\nB6z7GSWhB1LVgECZwBucAdK5mMYxpqeHYFnG3K5Es2E6TsqjlxorvuTra33y\r\nZACpNDl/RRNb78HMvg+TUQFmNPZ6/IaFundcRBKt2XG7xMtC3t9wwFNHyFEj\r\nY4jE3kOOjnCOiyBvq4+IZqGxVg+ukm/IfHBGg/i14UddJ8bgeW2zB9nlk1Dq\r\nmoV79HQrI/D1Yx0d7U8nc6PqKNiJtNZlZfYmGJ0TjJ+hRJNfPETrG3X7UvDT\r\nziUQhmybkzVEs7zVRiKGUNw0NOwIWYY8Oqt0IFNbdf4KAWXl8iNLnASFjxeo\r\nPVAKucEt+rx+CPTaG/BpofgOg20UNp198S9EHo2pUS8WmLIPuV3zDlW3hpf1\r\ndcUnvKA/sXuWGiJcxWyStMzjsXLs+L58qrCmQJC6zZ+XSsLn1Bujq6YLSr5E\r\nEkks3NrsHOh5sX78lhdr5cEWp0TcoZYNPFjsdLKHD9cj2VnlQHrKN0SvKo6v\r\nGew5pO/xalDUK5rOfCZT3nKBf2hkXWxvxNg=\r\n=gkbz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"dde5db7bce533d88ef88dca84f9822f08c2d5699","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.5.2","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.2_1668689535906_0.39915011615283036","host":"s3://npm-registry-packages"}},"2.0.0-beta.3":{"name":"@akord/akord-js","version":"2.0.0-beta.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"47936d6b37d6c7e9bbb00d6a3c565fbd982e9c97","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.3.tgz","fileCount":93,"integrity":"sha512-UOzsSFPBVgzXa94eXRg/zn8ft4YAsUy1v3LSU+INatfQHGwkN0RSy2/ZaVFpXGXtrvld5iNMmE6irusjh3axMg==","signatures":[{"sig":"MEYCIQDHbPE17pQlVGuW/MWnKyjzmQ/3Q0GJhJl8HQ18KDOj7gIhAOEGSuleXpNZm5YG5vl7VR4iNb88y5IlfbaYxnEOIPfv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd4BuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo+gRAAgrvBVop8pq9U/a9CGLGb6N+UbKJpyQLMhF6cfzZjaZdQH0mq\r\nWvpi23UKRZ03sKLJA1rWJ3f4xPHDHkDkWhgmbbBVhJ5LxVYVGM5NILZhwaj7\r\n7wEgxXES8GFr4HsRsqUVAVywTvB/hAM8tV0/h2a4WaNQHuRrTZ/KSdoPZo7s\r\nAIhwh+jGueUMMTvNAYc7bTPXNhGXesgM/qRoQIZNJ0JCmpfqBoiVxL9wMJOA\r\n0OxsMlcJI+s11jm8UHt2VJr1J8RNemaFX6234nHGk3CuFG/9IVW0+DiUP8C6\r\n2W++WcGwrDmtV6guZRZfRXW/2N/JG1HMADAqf3dEFgr9g1YwYzs8Fd0cs/I1\r\n4rjZQQTQcCwtB/wk5y/6WH3QuYCtlYcV+xrh/CDt1sYr5pnDYrquqwCvs+qd\r\nvRk7mk51WJHLz+jLeqQZLw+frDrjlkKMt1oUQtxLZQNbed+NzcdEhKMFiUZm\r\nIzD/9N64eDvu3J/Dg4r+zTlDoMc73wxkIOYZMnEg+RYfOGlLgvmsI2J5wp0K\r\ni7LMbwiho88bru0gqJOOx7YRixah7bt4+CCMqNyM8PPQgLfZfyYX4yrq3+sf\r\nrjW5AkAOVDY61c0B+JROkZy1zOi6KsnnPosQ07HFMHLln2H2OIYjFPH0cMEN\r\nPP07q5aW9kElGfn9V4mOSR3GiEiB8KpyrHM=\r\n=C/Fa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"04cf3e31bf3087cfcf8bec7c133dbc05dfd5c286","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.5.2","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.3_1668776046202_0.10263267038618551","host":"s3://npm-registry-packages"}},"2.0.0-beta.4":{"name":"@akord/akord-js","version":"2.0.0-beta.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"72a5506fa3deb30e67ed89b91f4e0b6e5c44cc4e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.4.tgz","fileCount":89,"integrity":"sha512-YxVwzNenGHd59AP2Sz3zLr1I3Tocfypgss09mCdN6lFYOhoI/wAI03SLW1KidlAzFHeKdTY8TUSGlCjArYcm9A==","signatures":[{"sig":"MEQCIGFuLquLQ5ajRce92Q1/Izf1jF/J40kfu7/m6a+lM/a9AiA4RwyvCjF7XxiNzR2642Jir0/m0wBCjXAJezRHPhoPvQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":302642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd4McACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqP6g/+POIXuAFbcUi+iiTDWjIJVbQ5oTGE1VHlqUxmcpbwEoCTYGZ1\r\nfLJluZmSnfeG11cOQ301jNlRHpCO6HwmH83vZZ06c0xBYLd46Yj9Sdzy0T8c\r\nkbpXXqI1GlCXSjdq2AKgoP7cnEB/qFkZ03qEzbbqRIvwOZ7F0pJFa7NyE48r\r\n/Ct/at/KO7OxTFXBBwJxh9TDeJMZ80/rKBMUlauZjV59zLa1sp8gnfV+its/\r\njyZIq8a5E1+XPa6Vd/X5V77CSoDU59IOK4w31hPhtbM61ZtassC/UKa7JoAU\r\nhurEjdMlx2b05YXsBG5QNC8jk85mcAYdwLp7fAioEVdhyL/tL5fXxNkKshv+\r\nle0+eK4SsrN6iYPwS34gDLRNPFXgBq6Y1qH30Eqy5W9lmpt6EdfX+irMUDGx\r\n+D6x5NpZDeiHlnm2bH+fJ+TM68C78iEE9yqWQobSIRDBeOQQBWRqh44Kf2i6\r\nmp13JO0JeFZPRH86wR/1/zYIuiIXcKn/XHTSCnEOeLKCJQ/oNkDyRlgh1PmZ\r\nbShkl5ihgUkCB0wzY6wR7e0hLw2QtDTo2NeupJPu2yIldXcwAFe21uoQxOEb\r\nxsmTobrxmz34wxvuU9Fyb7Cdb+MaV3NF4D8dqGG6XNx1nza36pJsAuhFTezg\r\nPT7xrplk6NtWlQhVBJNMvEK9Bdf202pT/os=\r\n=wiza\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"04cf3e31bf3087cfcf8bec7c133dbc05dfd5c286","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.5.2","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.4_1668776732027_0.5991613472459592","host":"s3://npm-registry-packages"}},"2.0.0-beta.5":{"name":"@akord/akord-js","version":"2.0.0-beta.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.5","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"7b6756f719bc25d7eb916f781cad0dab3b536e47","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.5.tgz","fileCount":89,"integrity":"sha512-vY6XvRKq6KmjR8pogcZ8vWUvoIkUAKH0AL+v4wiXpcwRMZwwa2QfklVP6w3EmKO8KWwbmLvAM8zhVcE5OIf8gg==","signatures":[{"sig":"MEYCIQDJV4y6glYLc2U13Ii27xX0etj0oABUfB7cvDZt2XLYMQIhAL0yMlkKeHsFRd1kmDl3xUPigDs9wZMzwNJsB1uzbx8h","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":302705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd4NtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4gg/8Ck4+QxS9mQ/TbaP8MnaQcIYOouZu//0iSSTGdVwrevrAWTed\r\nt4clYxPBERyvROlKk7mtUO7SvkD/22yw4Xa+kJGgArdKeSNbSbZxeUnBhn80\r\nVkuScaNXBhAG0glZQ02bUtetMlHdqWJKwTde+iBGgakqJzD4PzLXo81nTmgz\r\nlUWghiMTy7mDnWumL1JzaYf05AkaV8wCvJSlt93ka5sEbZNkhM293MEYHLIJ\r\nNv6zsYjwCp9g0crdNYkSAQHTfAMxjDqqf1qoCZ/kydCyDaIafS+Wp1lWrPy0\r\nDP3KqUIKkNa2KjXiKqdnTbOHiIQXdJQxaNY/i0OebMiuQSzek2RcOcoi3SsY\r\nEcPDL4s5ohR+wlHEmuDQMD+HE/Yk3SiZPTsC5Jx1HetKp5vX9oQOaP5dho2S\r\nWFJMHaWHK3VT4qYkhSxyx52Rst4T+xAQE8sSGdE9HgHFRbZ9v4Dgweb4J14u\r\ny79MJyyb1dG1wEQisL2DA7QrLyWNKVwjh0BlGi9FO5q96H4HkAyTyHd3ncUj\r\n6sA4ooiEvNW7J2+ZYhikaY4S+K9zodGzupInSAsYdk3egpL6OV9JEVO2H+RV\r\nPpODKQ/zutDRGhmeB3jPzh9nAo1QknvZg+zphpkA++QQGI4+SUXQ6tO+K+nd\r\n++Y0gb2brri2An6GclCQlRUFvZbjBTtMgzE=\r\n=ec9s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"04cf3e31bf3087cfcf8bec7c133dbc05dfd5c286","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.5.2","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.5_1668776812891_0.574207840315019","host":"s3://npm-registry-packages"}},"2.0.0-beta.6":{"name":"@akord/akord-js","version":"2.0.0-beta.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.6","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a9b0487b43b495459e0b548df847bd6e400c210d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.6.tgz","fileCount":89,"integrity":"sha512-+Y2BlHhiY6VbOPACJG3wAnScWoYj6QPa+S+GMMCNNyYeAe57kYzrPOrT9PxOrYtDP4x8XYxLXXwqQxGqaXNzNg==","signatures":[{"sig":"MEUCIA8PO1pwJ6M2Oo+msH3DuSA83uVrpCIexdjGQUkalGbmAiEA/W3nk/lNaSeULmsdIi38xHa0Bs7JYrlQWmeKpp1yWoM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":303377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfkIAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrlhw//WxD6qlXbqnXI/6XiDLV6pq7uBysgWOE5uZv9LK2EK0qLOpDS\r\nnbju79dRhOwVvTGb5B+Kn8qxCNMSh2x/Aq84FFIiBiXGPAqRejrobfVTnkFN\r\nXF/ZowT01rbqdrehs2JnPbplxsqvUijbr0PB7atye797PYTqzQ2+mL56VL1b\r\n7B7XrMnHGjTN4C/rmRmpvUK7x3ZWuTOXH5pSuqIraapiLdAn7Lt/+btsZrTO\r\nmTVBaLPnTLgBwdu6Q//8bEl7l0yurEZFxf0Kftvwr6EuVA0WKpFgJrwdEwX5\r\n1IueoYLAvokz8A1+XKrQWKDwsh6Le+J4I1lIJHqL3K19O7JywDRofqZH6j/z\r\nNR/r5i+byhBT4UlMNXIy5qt+nWLc/42yY2X8/5JUm0xYKniEVgGV6HCpIaGH\r\n8i8BZ8k10To7+IASN3w/NYnc+BGcbMQDKj1QJt0rOppIApdBgCVUkQ4Xp6EG\r\nX57G4V5qcBukZO2fH4fjKprZOJutBEQu8kUDyGNsXVkK//HE0pv5cW57ijts\r\nADQAl9dxBwMNTK/JmECzucRZhZl9JtvnHKY7JJXN+LixhRg49j5Widider9G\r\nKG+SxLGy71UVgzBF9JeiRswFKlMVtvtuBLsmpMyAYsjgKpsRn8I4rlRhnbLE\r\nX3vTHLYKIWAlRckfA2GOACP4cn2jRmJ3bUo=\r\n=dS7+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"04cf3e31bf3087cfcf8bec7c133dbc05dfd5c286","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.5.2","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.6_1669218816566_0.6953632959155749","host":"s3://npm-registry-packages"}},"2.0.0-beta.7":{"name":"@akord/akord-js","version":"2.0.0-beta.7","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.7","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"64792ba7cc2f6944edb71c361d88cd77d8e8d402","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.7.tgz","fileCount":89,"integrity":"sha512-B3Dc/eHzAVzCs8Wchij+nI3S2uLYN6J5vvpUSUfqF8z7PutchcsNr+FXOd9nYD5z+8lhh8fP2Br+Sjfw1jerCQ==","signatures":[{"sig":"MEUCIQDPEVxjFy2HgHooj13cBs+f3VcHBIzP/zuIPyMMWk1u4AIgPWVCZK6XDuJtolHm5jb0AMHKsrfB4TnR0GD/Q/w8kLw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":303541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfprdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoyPg/7BejaRTlwugpsqXb24EnykWUOOTR9Tmt3JhRNvbHR0lMKdo5l\r\nZHfk0tK9ohOU0v1+CiaEefnYa2rbMMxXcaeUPef0G8FnjqLYtpiiqdwNfXPX\r\nSI7Tt6C0L88cL0IVngim0lB6XYfAneH1xfSrUa5LnZLgWge8wfM6wmJh+hy7\r\nK5cgvRMpxIbSrEK+MFjc8vC+Gc7TBDkSNpPLeuQ1oZCN1Sjg3XTTcYXSDx14\r\nSRZ9B6O3VklhLwUV+aIuW80cyuq7oSispVHmcZRYi+yVolaqwYHS0z6d/vIw\r\nlwnfVX+1q1qQdBJiGOrRjyTTNxCrBXRUM2AcbLV0vMLaujJL06faOI8O3cER\r\nvvoO9xkneRMVXkT/IrwARx+aDXdKZw+85i8pal1DE7qIM2/dFTHP6A01DcEI\r\nRmvVKnyTPYZ6giUYSC3nAyNP7TGXhT1PNH0tVgg37JKv+TXs4ma5VzR+DbLM\r\nV3XgC82CWWOFyBbpRDFmyh8CrD4fo0rNRYbI26xgYFwKG4vkqCDkYSsgtN+4\r\nBNra0aofskImFOcuKTIY6EVOG2HiPJloVnN5RLgLvoMDqluSfBRjXr3lq3zy\r\nQjK/H7NF5mkBHvUysuGkCEvvKpEW1amBWRX7AMNM3lbH9zDFjALXtmcMw0MO\r\nInfb9tbIJkSPx0D1vReZAUEXHyc4vVy6mEQ=\r\n=cLxr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"04cf3e31bf3087cfcf8bec7c133dbc05dfd5c286","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.5.2","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.7_1669241565125_0.42153615753762286","host":"s3://npm-registry-packages"}},"2.0.0-beta.8":{"name":"@akord/akord-js","version":"2.0.0-beta.8","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.8","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c17656615326ce471d4bcdbd3dd1827ea61bcf1c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.8.tgz","fileCount":89,"integrity":"sha512-5TvuIhGQLBz19/zARBPLDBnsQ4aqhZwSOvQRpxCeTi9oOZ1YHLVDMafVSv3oaKTnwaUy9bCOYUotAqMx8OJD1A==","signatures":[{"sig":"MEYCIQCznyjmi0oxdkXuj4B2HpNXQw6wFDjxCG0PwHYv/s90RgIhAKygyepHowx1g89mhZotKgsyHwdVpXVlUvp0jGt2cAOg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":303669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjf4CUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp34g/8DEDHhvVSuXgpfLXARMAXWvSE1LpJJIHBwQ9zju1dR/zxZSwi\r\ngSBPYDglCy95dVrzqMPBDu27n+QWebSCQpbxpG5y7XJDhd6gNgmfAJrHDQ3F\r\nnQlG5JQnG+b91FYy+YuIGY0iX8trPqMhiWIhsAliFsjELQ12HF920X5goxGX\r\nCes6c8EFU65pLy4Y89mgnPyVrex6dTLx4T/Zji3QO1SF3XVWP3t5cCIYpO1/\r\nOxu7JJ/bH+RGhzEWbqAb9DJpCyWZdCJWEMsGQl0T+buh6kj46XPws5jx/Qhv\r\nclgP6FeJRiu2mk/9SCa6BslZeoJFh6Pn+U0ve4e1eCWfOxe/Dakc9nvjyJIu\r\ntZzn4Zhpf+kv/DbJ97wkRYAh0mYLbXj2rr5R01T3rFkFNW70q5g39T9nF2sj\r\n1V1uBFos3vLcOusFPM0+cjzy9kX7TgHrOv3/Rz5IdpYTeMiF9SPxHjbVe3TM\r\nOJ163GH6TW/z/NmfuzGqkmjfIe/SnihqEmJZ+YbJXHLnjDppUWwjoppHmwoJ\r\nzcFmseatBShgIRShFf+4eDJarllHLqQW4dES6StoeuLA1QMvc0gdmEjVNYRL\r\nmXdXF7pDlghso2XEzbwxsrFAtkXKpAieMv6PLPer3S0Z47FqawPP9ufhrAO6\r\nQoc7QqQ/dP7/RjpNkAjvdmn8ij4KHP4Nw5E=\r\n=owO+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"04cf3e31bf3087cfcf8bec7c133dbc05dfd5c286","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.5.2","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.8_1669300372253_0.3314784721251123","host":"s3://npm-registry-packages"}},"2.0.0-beta.9":{"name":"@akord/akord-js","version":"2.0.0-beta.9","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.9","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"0fa69966a703c3ff907e722547e53ca3de64ac1c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.9.tgz","fileCount":89,"integrity":"sha512-GanuQoo1P3MiDj2ILhOgpNc5ybktFTQSaOZ2K855TmokXsplA+Ix1ybPqKWhGZzrdLoVRGntdd4yL0ea36w9TA==","signatures":[{"sig":"MEUCIQCq4oFKQZZmz726L9YWZ50tKlZLOFUIZmSHfStGEmsllAIgGALh3/zNRuaF+ZWE1h8JwRQVtcjKo4g+JCaOfv/EWuQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhzqWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9HA/+PvwNryNiBIIkIkJGIlu5I72FyaN8/++zdb2JtlWUT7buz78I\r\nJ+bLi8yMtZSm6I3Kb0NDM/eMykDCiaXw4RxWWkS99DvqDUFT1ymhimXa3+GS\r\nFPBT/1UvLR1yIYOxHkO/UfPLA+y3mguKSrxkrr8QrogS1WpV86iT8Mc3j2ti\r\n7zm82+2MiYiL/sk7JZmAjAeZXm9jCfgRPya3gNLazrNmTurPXQmTkyDfNLDp\r\nTtUQqUZDfQOg+vsH3QCQBPmuLkBc8xdLfjv3P064eNdQNkbhaqkDE00TbKrm\r\n48w6Y4NxA8N7Kmk1hmA/8v1CsU7n04V3M6H7qJVX2073GHCOcKYNLnL7oNFV\r\nQ4CYMXj17An+CnNbORU3YuNhsPacTUBgOn0HegqmNjyAVjsqObkfwR2tvJZq\r\nk7IfRQ26CPmmN0W8nhLFUgZrl33CgbxVKcfuYMVgmHSZgrqfeSK1RHIpD6fv\r\nJb4l4BQJCu2twxuN6RKOQBBKeo08S6SeZo4bBLRDecVPGMtqJ5kOzOs6CJVy\r\nUn5S5n+Yg1pYGlwp2Y0f+mdOvrsvD0bKFaZz4+WNO4qgmsxsvV4OmYHw37H+\r\n7idv/wXNw7mP1c8SW3hoYCVkTGZUPVbl3VI1UTH5HfyMUMKAMmEJWzHPAGtt\r\n/IRFs4y3nd4v3MO0RRhh1uymjKbLUNz+Kb8=\r\n=rmLr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"7196fbaa328e3ee62a71174598faf8a148887bd0","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.9_1669806742605_0.7318986829247291","host":"s3://npm-registry-packages"}},"1.9.0":{"name":"@akord/akord-js","version":"1.9.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.9.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"69eb596338da58ac829bdbbef541be47dc99261f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.9.0.tgz","fileCount":85,"integrity":"sha512-TVX4drJeSh8axiA6l7pM2FiKGIZRBzHR5Tt0OALGbSzZlU0359AEhekz5USuoxC7GVQCggJ7zZsFjmXrhG80OA==","signatures":[{"sig":"MEYCIQDr5YdNKCrGPsZa9aOc6G3xPXB/eB5kEM6HAZqmUh6ghQIhAPPyirETT/1ODChhuOCEK7+3naD6iK6C5/PAD7EPtnrR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjh0fWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtvRAAlVGs1JZS/G+ysN0kNXFuW2fu7nylj3SR/ExdWBz9X6J12cff\r\n/sNeqVd7IDt8EwmjdZmXVYASsSTxQskjI6PoPblm20FcDNRbiAq3hMzhWM/Z\r\nZf1iN/LstLeIKACcF0Y+hJ378NSykAoKr8w3kM5il3FPe+5uzP/7Sj9mSHk1\r\njMzV8Z9d2hbc4aYX/zj4j4cfE0SYucgHaaJ3uorbtm50i0FcU7NaeZfg35Xk\r\nXJVsJL2r9kxm8gdpCQFsjzgFMSRzzcS76FN13bE9tMw/BdiqlAVQbo9VGqLC\r\ngsQiDnleNuvyUWPm/TOMDkaENbCbV1sefz8y0Hf+c63+GighKXoZd84ANKRD\r\nAcPF5PPnXTjRFvTNq+bWyZ+mP8d2YYJ/7vIExGD04BoQvBUONyRTKEpl2y9/\r\nhhlw/72KvG7KyW4FUmwUlphIAbNAwoqn0vk0SIQJZNmhT7EX3kE6ZqY+2EAb\r\neAN649UU9EUyD6fs/xuZ/L95r54ndJtXREkCE0pAgOLZdXHd2+9gVsXdQDTZ\r\nFwxrbcoG2RJbdYAvKShFT+9yvNLo0fhmkgqsEIZhfMtPXEsELfLZEqUnhpUQ\r\nhuKMtD8vXQqqDW4qltAwrYPO3SuZVGb4JebthrO/0iRtiV0Ft8CiHfoNZ5L2\r\nEMrkX287MxF20ulfRs8Bv1IpN6F7KEaXSo4=\r\n=znn1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"a881924f0bb754df3304ecf3ae91f72a0cc994ce","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"Akord Client","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.9.0_1669810133884_0.9609685856288648","host":"s3://npm-registry-packages"}},"1.9.1":{"name":"@akord/akord-js","version":"1.9.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.9.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"0a1059ea6bf0532b01b541f026c5c67994b3d1e9","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.9.1.tgz","fileCount":85,"integrity":"sha512-lS3xUjG1pdaLi3OWyNkSMLYcYqtl75FztkimYPXXTyavnqaaKftHZQF+WWhXjIQJA84HHpKzlbPGWFER1e0YYQ==","signatures":[{"sig":"MEQCIHWwxGToKenLhT7nO5JUU55Tjp7JT1N2d6Npw022Rlh6AiBSx0iwKwvYxOLK/XJKWU/RvIrww4P6Us3TWaX7C/ML2Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjh2rVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq36Q//THhkfx2ZRDz+jiAYVhJcQFValhugCIE7HBh1hhyMgc4UlMjN\r\nZFmNvz00hYoCFbpUeyH4Pqo+A2pgayMDanLy2TygPopgeSkeu09Liuntz4AM\r\n4pWiX0DAeONsMQi2wRJdctqOy4KZy/N0IG8NXvL98oiNJhtkmHHzHWKGBj4e\r\nGh1hcQWoA19XdGxAImSn7veVI+7IK/fS+hsDIA+kWcDd4P1F9jVTqx8G63FE\r\nlFO5uCK/sk/+7uclmmloGxZyZqBI9owMS//x0VWgIHepbn2hvJ2mHvqUjJlJ\r\n5Wx2Of+Agfg3ZvoiGnd/iqcHl0vymrHprUGMqJRRf3nO0X8b9x+DY9cJNzaz\r\n7gelhTHtgxjfdpjKJK4//cRYWsSVB/Jhj2kA44WhmoZtQWfv70Vf4uUKVC9n\r\nxXrBSl7B163p7vQBA5JiReBgW4yVDuA1VswIy/aU529WXcmtkvKj4c9+qVBe\r\nvlCKU/9F8btKVz8vaVqQV2FJwgLyMaAzXmrmmji/9XAMQrEsZFSW5urahiwD\r\ndNk6+1SZJMrRk2GVABDLKIOHA+RdvUONUdIRA1vUYOHGCF5vYheou5GcdP9w\r\nSm8z0qM9BoBDE+aY6baaqgQhrOWLWTdrMwNMsfihnoL+BLAs0dVnTWBXIS31\r\nk7eF+ot7wjfFQlJTA6nPmKYZz9izMu6T6vA=\r\n=XVOf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"c1a277a39f796a76ad45dbae6fab7922ad011af5","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"Akord Client","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.9.1_1669819093366_0.6014685973128095","host":"s3://npm-registry-packages"}},"1.9.2":{"name":"@akord/akord-js","version":"1.9.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.9.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a2c2c62a3ddfaf7c73a1abd52fa7e8b9d56672e8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.9.2.tgz","fileCount":85,"integrity":"sha512-rxv0+ZMmv5MAfjjPlQ+J+DqBZNQ635jBEUXeHTYAzgzco1QHWWO6WdwsR6Kw/szFQIGLK8wJ0VHHS/4XQvi6Jw==","signatures":[{"sig":"MEUCIHi2LJDud+cSqjHk3xHmN/oERb6kFbb5yBF92jN6/NPGAiEApcVMsYkpcGQC5ddTOEpy7PTpzZeUh/H2lRtcuWPUJRE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjh3mGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoAtg//TrxNe4vvgLL7qJCpjPY/kpDJaWuX+Hve5euVJHRNw+/cWJLM\r\n9QGmz/5AAJLOFgNSv/s3Mukv0eTlJw7dOHZMMC9aqwm+cuPKAjCd+Ke2BIwA\r\nbYzK2Y7EYOma4CfI8etOJYxyNR4Xd0LIVDBdiJKGRjhbZDB1cUVNjZx3TPBJ\r\nLayiGTTn7HRM/hwN+YmfIeOmR5+rPafR7mpyFz8iv6ut0VHs2GfmDQ5H7jPH\r\nrNsbio4P8N5MCChLmPFWYY7Kn5/PdsIyT9y4WoVZSJ34k7k2Ft/G9BvbCJ7O\r\nIGjsmBSdRYKKWdaKX17qF21zWKDlN8b522rnaYpbPIIwVbHuYjsPJeb9xEZS\r\nmrz3nMxa8VCqgV71zI9sL65B6d2+3TTJTkZBYFWHcc0KdqiSBSsE7/oern2Q\r\nCPqVOu9MQZ1KDsPIRG/CDJftiNi28nKC5whJTksUwN0X710y5jOlYY0dL98z\r\nUQyCFSaZsa4+ITvRbyGL0Fhk9anqrWX/KOdiORRQDczW8nYdjq08QF1DPRal\r\n8RGRXKMng3DNBQHSmDFO2gGFUhGwKEifw3658fVRi+7sKgpSz89Y7UnPilaR\r\n3SIhXLGkMU3I6vehMfgaftFflGFNdzhyf3jfnMMzZI0rR0CEbqwnFR9WYvsA\r\nuTjtwdFRN498iQwjTBXnG7AigMGFCUiYnuY=\r\n=uhNi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"ca35a4fd270a81740f8d7027ca78c9f40ad1d322","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"Akord Client","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.9.2_1669822854055_0.0162191707419439","host":"s3://npm-registry-packages"}},"2.0.0-beta.10":{"name":"@akord/akord-js","version":"2.0.0-beta.10","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.10","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4e87cf17568ceb600f85db5b3dc939dcddab3515","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.10.tgz","fileCount":89,"integrity":"sha512-gOxqUVtJ4zclUec3XB/qfW2ias0yh56NaV/ax45QdJaxmDrWj8wdQhI36iQzFeWVO5miTnnJWAZ3Zm5LJXia5w==","signatures":[{"sig":"MEQCIHAl+cyjQDgL9H7qnITwL2wrNNq5Ie4xHhCAc2Jn9a6FAiAWlDscmA2169Jjgnx4g38THY8COOyVMnfKnn4gYESuUQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304248,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiJ/8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVNw//cLfcdwdssbIXYHYHCoqvlNpoq7Ajx29/FNelg4zg+DdRPYQg\r\nK70cR8hq9UYkFjCuar6eM3oocIn3YJlZVT7k9VzhGOceHWUvRONbewzk2FOm\r\nakFM8q1A/VFB2ut6aOSidH/uTTYED4+GIbK14D5MYazM+1LwJ4NoOupqzGDY\r\nuidp71QiLy/gwZS4+C/zqE7uACyEobezKIZkaWUnqQS4lyfgtQHMLPMGTXfF\r\n9p5WerKYUARczLRKtAdKPaxMq61XyC6bx9lQoHhgRQdOUvkJuegL0dqFP6S+\r\ny+cTcqrPEx2ud8VmddmeZSlNj767FcC0kl6DEfKWtAaF7WUP+YBr6mq7Z/4T\r\nj0/fxKsIkF5SVwnb46m82mvE68LMvS53r/+jmKkV5frLe9I8rU9KJh3CVsK3\r\ns6DzLQXMqFtTFj57+lEDRuugwAE+X8SyM++kgWIJPPv255l0Ot2EGW4SQLhx\r\nSqkJ9gmuqWze9oTFHFfwFiSahbwA1lZS3uqiHnjMN1qV+N6rfVFIn90bFmVc\r\nsBrVdjbkq3M/449RFLDBS5kThy9uON3HUUvLndnqd3iYyq8p1IBjt+UZXEc4\r\nrUW6qwMEksTFv5DaASMJ/+Ah9VEzzvW0kCeItYBFdOtAqs6N4AJU9yM19EdC\r\nyB/w1KhslmP1iMO7HoCSZFcX4Mr/yztaG/c=\r\n=simL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"99b3cbc58cf1720f6b89d5c45d02b9a267023439","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.10_1669898236502_0.4873359177569936","host":"s3://npm-registry-packages"}},"2.0.0-beta.11":{"name":"@akord/akord-js","version":"2.0.0-beta.11","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.11","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e478fa7148ea575aef866df3d2afe801cd4711f4","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.11.tgz","fileCount":89,"integrity":"sha512-vgZo5ukgZTQMD9r5+kqiKcqNNadw8AhUjMqsFbApG0CKw8AP2+TAp4Kf2FVAxbsaCJCYKZ2/WkunFvP/SsIZFg==","signatures":[{"sig":"MEUCIQCQJPAWi2jkHnXXeX2gMs+6U3R+mH7G1G8n2qabz33rlAIgfA37jy0nL5iPUtyJ8RuW6mVCx+17SeQ5/N9FBoB9aU0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304508,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiPfwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8TA/5AZ3UtEezJOLpY1qd88uXxKVS3vsYgrM6o8/BWhKBr1khvAP8\r\nmWdQJbnWoI1eTsXP/gudEv+d4JeWPLn/BDdvVMyT2Naa/Efgd/4oITpgEJuA\r\njdgB36ZXp5ZsMY/tNxoOpxU7Wf7YHAyloTHi9qVb18Ul1dGtrDekVWVBMgzt\r\nH1VV5VhDwjdTCH/PtNOP2ooeJ38OTVnjJ822bSnAHjitoHY04Y02QJBn4bOR\r\nkImnAGCQRRIl4qdmOFiQCpkz1IVShxtC3ZB5nBUewTrJ2h1OlD5SDWXBwaUz\r\nG9cLz3odiCmAVG8ie6qVL0azU6VcL4p1jz1Y7y0a5pHz2MeQ61AxqgYgYwEn\r\n0e95OO5F+UkxlViDNbHQVGg5b5cg2xre7jLopk24QNlbiQv3xIMtErsUrJbh\r\naMWnb76pQshuSaOsQIJnrV4WMBqoMiEXEPkACHLkrmRC8bx9VC/gx5jEayK3\r\n39xHUPPKkKLHodkQKH95eYHaqsFar8UsZDCPJdswYwDwCDFyO/BdmZveIf2/\r\naBlDB85hICHu7SkDX9qORyVkB+4yXY3oLXflmMs4yryxN+aa7wK2Fl4LhAaB\r\n8HbrO5oT59+ufbdGbXrCI+D3AZaOXp/9eHQKuSBxzohDVzmWSNSb9BKB8lvB\r\nrqHf1xXCTYLArV13GTZ9CcMhNZgn/Auaiv0=\r\n=fP42\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"99b3cbc58cf1720f6b89d5c45d02b9a267023439","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.11_1669920752632_0.022104438853530972","host":"s3://npm-registry-packages"}},"2.0.0-alpha.0":{"name":"@akord/akord-js","version":"2.0.0-alpha.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-alpha.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a2e8492e471c1a9805e34cc4e90e909af3250c9c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-alpha.0.tgz","fileCount":83,"integrity":"sha512-9IXc/xREMcwHYce2qJpKuiSKhPLzcskqHo4Bi5bLJGunU8fOC0qiDfe1xTZTkk1wGXpEhlAoG2jesSQ0kNbzcA==","signatures":[{"sig":"MEYCIQC9R4cCErWIG6OP8vbLYweyxI7RKdlua4N9Vn2Q+eh1BgIhAMvrupCNRz79PTul/y02xEevtlz3udm+1926X7cIlaca","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjidSyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo6oA//U2zJ3Tj/4SN8sjjrZB60l3Ngx/YFOQ6ixaUovOfB8kw6b++V\r\n8iZ7oEcNMm/Yf/qTQQyAjpmwcPxWy02dSNFpiLSBtoQamHems+0umKzJ0yD7\r\n5SlasknCDPliuHVGETCRJLQDBGffx5SYkeov6ITp+qfct0WkG7INBafSD+er\r\nFR1pruizctg8q/7Qf2n/+exIikW5hvXK3/5gq19/BF47aTVr/ds+GbpCtiQv\r\nVKzuLrL+HYDrowwv0R0jJxMzphR4QHDeTIxloyeqvGOquQlxToKYsulleXuU\r\njNwgROsxK821C37FMzzkLf7Jx291kXaBIAfaqnquQiUrI6otN4QcMx9LOc6H\r\n9TjtdKUrzFw0yIAFe6uRwy/EsGZEouHKZ1BEqLxnfY25CKxC+qfL2h9naxyB\r\nVmq6Nnt2/xkjMntfN/gEvtwVcopKEG90IqI/VulNAeGkaiWK8fqTMtcd4yhA\r\nThKSeM1v/ActDmygX8KFrjjugWVBQhobXN8Jbw/25KsWVhFg1EBdbIe38H3M\r\n/NJ/1Iii0kT4IURLKlQ92W+UpTp4eQFMyI2KN2pYqg0whnrGkn0aWCpBz8pv\r\nGdEpSUnEwEBhPhCxuNQemkcomK3MSlGQRxadlwxl1BNrLO6qAZ7BpvGsfKjg\r\nSkMJnN4iV8SiP0Hw1qbqUV1ESI32Q9btvBI=\r\n=JN85\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"17695f2c20797f70dfb9cd2b8a467f17ae72dd33","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"gun":"^0.2020.1238","rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^16.6.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.5.2","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-alpha.0_1669977266590_0.7575409594601481","host":"s3://npm-registry-packages"}},"2.0.0-beta.12":{"name":"@akord/akord-js","version":"2.0.0-beta.12","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.12","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c36aa043bf6126ab56fe8987cf78ba9dfd03a1cf","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.12.tgz","fileCount":89,"integrity":"sha512-x9Sf9t01S9QZhBtZkLR9/brmJK4aIbw1JQmE+vpm9MAyByqnfewpjMOQ1QUEXtY4pvBiVT8Qh6qFsVIV0VDXVg==","signatures":[{"sig":"MEYCIQDoigjuJiuAAQgTkWhJ1jZPsbsloBoE8YZZdYCyfsZYGAIhAN4x2VoSRbs1YYQgFxPzy1f6p94BNL4Jnl04TGXb9aK+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiiA/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWag//WRgW3WdQuFAXqg0CXJm99Cj3puisUyBROImIXqoIi9Ek2kMB\r\ntgc00/K/+5uxYgIQA+JLibm6UPj8RY0ccY1aVLoWSGhRiNzL2d9cDD2LCwhr\r\nHeyQF3VkRnldhpfPgA01FMeA373zsIcDe7mNnJrMDaio0hsGLjvMLnKtyh9A\r\nz1A1+63EXJREsSyY9W91y1taG/y+vGLPVcgB7R5+BK5mtSoYqwUvXSJKtjGO\r\nJki9YARNfnrHStbhKxhm5mhqQeEpMFg9chhBl/Tc2UeDTvqTkEN5aEJ6Emug\r\nLIQXP/2cds+rdlXhM1x2RaNnUffa4Rt1Gj4vRIRO5T5nb6Bc6o48wfVQ8Xgp\r\nkVvwLuu9qBt22kma4pW4NFNNHj/67rhKw3z4IPMt0aSbPu8ZqDxWnIVuRxf0\r\nx+d55NC4Iru+30MhkouF/rYM1RPabrH4qJMu8hFHb+SIz/jviJC9DP/cZDGb\r\no7CMW51uTf5FQ/pZxBI3EKXjOwYpIttN1qc3N/5rovvz1AnFFiz7CMR5G5g4\r\nqui7d757lsodQK6jczMjPRmDH6oYrI9NyIRhgLeFY5tDusn/XNA2tUumTkml\r\ndkt/EIVNRmMsxS83fbxwnFtT0jYWyNM5H5ElmaM+LplR346z1CDRpm2tNOE5\r\nQ9fxtDOl33f2aIOyu7iV8mnfmV830PvKULA=\r\n=vDM5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"99b3cbc58cf1720f6b89d5c45d02b9a267023439","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.12_1669996607485_0.46377260537924725","host":"s3://npm-registry-packages"}},"2.0.0-beta.13":{"name":"@akord/akord-js","version":"2.0.0-beta.13","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.13","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a68d897634f255ca2c0688927dcf46e4be5b33f1","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.13.tgz","fileCount":89,"integrity":"sha512-e3SRsU7LCOq//9pSweHEnDplSvtR+kNl43fw2MYarrG1d/7hXSiB0lhfGCuLQIxRudprI2/Gc+xNmHWHMVA8fg==","signatures":[{"sig":"MEQCIGfsmzFPeKmfo37/oj6bF5RWYyuaH8YmTu/jle80gCOKAiAnP5lt4HgckMXlT+RZM/hB8Xe8Ad1MdhmKzxatMBzQSQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjii5oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrq1A//fPWyLkb8GcSnuATX/E1u+EIArRHhl6NEiAYQtusNwkrMw6tk\r\nIB8sZl49HMrgnYU0HEgzk2mP+kfZzx+zgH+egoTcUfBsCdtTSNgSrpVaSKX+\r\n5kSG/Ebi7S1k1g72QjPL6X9r3lrQxV1ddpC87V1045dPZv1+GsCTjtM2IdPl\r\nBSebUV4FR0KuOrPZMoRzDIdHrdA4aTUKD86EfdS1Hnlm6vGb64FXsNprev9l\r\n+du7wzk1sGn5wlRomS7tJovNOSqZvqzRJHacTToZZBCgni2JqvkYekDgTQn6\r\nBpd1YNnaM8kymxBou5lG3WVt0B2RB5oW9/VeTqhH/7sLBhL0Vr1LxWlVJjMJ\r\nW0mU4IPYmwbYBj9LhBJFoschgOza2uo398aLXPy3J9AsvlRR0kq7i18+N/6I\r\nlmSrPNCBDt+h5nhTBVyhUFJ2TKS1wT1oNUslz17wTQ7iJNH5G2ww/kmUcYuu\r\nONCcXlk1+D9z54kjK42Vx4hQ7/wX/WuTrzbsfMHDZkxbSWTvEIXqaTyfr5sy\r\nLq228XcBf04eRE9soCUIF4TpUmeW8BSZaiEi1DIVUyYQTSP9txekqu/p59D5\r\nD38T77cOpqR4crwy5ZbphAuZxQ/H++YF6Ir2Kmm65vw+rP3KC6aPwt2imkZj\r\nWghKcmuy1l6Y32KzUwMaCXLav/1l+BIi75g=\r\n=/nrZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"99b3cbc58cf1720f6b89d5c45d02b9a267023439","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.13_1670000232545_0.03584733562947906","host":"s3://npm-registry-packages"}},"2.0.0-beta.14":{"name":"@akord/akord-js","version":"2.0.0-beta.14","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.14","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bdcb22312705bc60282ad3a0c9c39551593a669a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.14.tgz","fileCount":89,"integrity":"sha512-TQY2uKVLH9CCPMgwkLduXaZgoe2Dt0k6bi6x/ZKRZd9o4v/j7twWfZKUFM+cLqi+77YpZljq48yeRQqEgrQwWQ==","signatures":[{"sig":"MEUCIQDB/s2RH6TNk0XDBql5w9e2rX/pOpm2XG4WNNFNvhItMAIgPZiVBGcKb0ikD86YWsT0Ta843yvVl4heQpHgwqbQ6Po=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjmXHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmolfA/9Fk+BoCpTL90Z6q12+DnpS/MI1ITCmStvH7w0dhOlLuM6nXVq\r\ntIpmjHEB2GzJZuYKcMHGTKvEcyGI2XBddugKTalqCkfEGDf4bdJERqTXsUvP\r\nX0u3C4wiAkC1fEctEdqvcemOJhQ+4fSsF+70NddIzp+R6VlJ0IuyxVBTCXtK\r\nM9u4TlBZpbwTO8K3Ycinr3XWKNWpcFG1jF2b4+828zmREXeNGKAeRAfUtR4s\r\n8TuQXWsZqK7YxDy81oJeDT2UEH1BYZpRg+kd4OAVvmdzN1L/G+zBBOr0wOtg\r\nxnDJm72pl1uimL3SaMI/7B0yX0ToucJJLo6i9o+8LgICvTphxRx4p8cP/2DA\r\nWgl8VfJSFXSaMTb8szZwOf8haolbvHIM0emn4e55baQvHCxsoKBc09X0WDGH\r\nBQc1YYGNqH+W1GNUBxJza7zJ3B1ExCMd1Lf5uDSgrJjpexn5m3mWF23ynaw4\r\n9xFsbWaaF+X+H0KiWTyvUv0pI2TwVGr7zUyIf11jyFfITmfa7VJKUv86ltVh\r\nVhwSQeUgq9WqvsJw4JYZQi4xy313MLqcnIf5oYIVPc4kTrFyLWzxBqntELml\r\nnkKagepN5ahCqvC89S45m3Hz088zwnIHWbGtUqAlaXwh+7PX6PAGY7rYkQ5H\r\nGteoGJOzQF/h5zyfePqoBI9HiR/hDl2wWqo=\r\n=1N4T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"99b3cbc58cf1720f6b89d5c45d02b9a267023439","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.14_1670276551654_0.9003088268322903","host":"s3://npm-registry-packages"}},"2.0.0-alpha.1":{"name":"@akord/akord-js","version":"2.0.0-alpha.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-alpha.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a34fa3bedb5293fef304770e99cbc3057e698819","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-alpha.1.tgz","fileCount":83,"integrity":"sha512-UVH7ANpdM1DJkGgCmM4xObokEgd3MKBI7nZOz15PRtURcULB3cT24lNfKFJRYES2o/6Vbscl1e4Bz2mMTh0laA==","signatures":[{"sig":"MEUCIHDfsr/uGCnO1QA8+W7EWAevKwMT3mxEhB4vDQ9Mt/2aAiEA0uA30FK+AqSLNVisuE3gjZbEP2QWRzZQ2AG3FvdMwZY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjj3pEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoo/RAAjdVw0i3dOaGHd+KzqgFhAwO8VDOmHsqsAISZePcMEwrGeJJX\r\nm7pUgBtGETaJoZT/WNAop9r+Kus2VBs+cudl94Zl5dG9vkGCZa08R1w6JG4Y\r\nbbYvpT9w+1/JPNiqnBKfH1hD1lYbhMX3IWawtfL7+leL2+1yAZxcHu3zEqFv\r\n3FoPhpIZZrqVHcKmBWlFmUGJhyOTIdskfZZf+YE0NIUDXSU/6g8NLZNyIcXE\r\n0JFZd1AJawZfTku1rin+hrpcEwv53INkugwxkn/XkdkyQp1uFLfHgoJ8GLaO\r\nckaec1rooWEI22zPQac2jSiMSKSAk/LbZgix5b0KcOq+3HOZSrS7cjZwjOJ1\r\nIO3jbySACGAfLbNmFq5jPD6KyJ0xrmMEq7esGhSPUE/2KA9W/LwVvUzDqDQC\r\n3zwXn0TO3EMV4uVXLybUGXR2IRA4U3OY3PReg/TOd/aIo4Hj4ljWQ9wPHOFh\r\nffs6MkAkRv+8JcBWSVe2myxzBkqR1K2ms2EnXwPsV8Wqiu0U26qiUrbRXs44\r\nY0Q/dGJ3tV51H+vOAKwavwkzB9HQaCKUixHgwY7X9fxtsbj8ACft3tkT3lLL\r\nnn28NHQR3s8HtfQpCeF6Bkoz6+BONuyJ+QvSj8zJbjhrxCXuK4ROIGT+aO3s\r\nDBwByl8287B3fMFYSSuUibDTcDnxkgG5ZZs=\r\n=6T/+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"656c3a61cb3e3bb91e941fcf28c3da75b697cd37","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.5.1","description":"Akord Client","directories":{},"_nodeVersion":"17.6.0","dependencies":{"gun":"^0.2020.1238","rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^16.6.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-alpha.1_1670347332470_0.8754331150094048","host":"s3://npm-registry-packages"}},"2.0.0-beta.15":{"name":"@akord/akord-js","version":"2.0.0-beta.15","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.15","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"97a646f1c290929972ffcd7b11ce91220950abb9","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.15.tgz","fileCount":89,"integrity":"sha512-YKQDfa2SYfnJIPpZLjEA3PjtP3L+lKA64qLKmGtxvUEcFwyyjVlum84V5JJrPNzxZptdVSAd3pYdzTiCAqxRHQ==","signatures":[{"sig":"MEUCIQC3M3DKfIYVjRtRikzO1RaJ+m/jbcUgVcFzMWLkgPvZRgIgatZOYJ+mjwFlKm7WMioe3T5Emxh+hB7ZvLgT4U/wjyg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305801,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkM6QACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGxg//T4vioPTWtahPMy9XTwulKQspH+gcy3UfucY/4mOCkelZH1nG\r\nAf1yGbNyPwlrQuRAvhUVo19GrwV7RJNwO1tN7FsVlNB1r5c08AniWUPM5XkN\r\nkuD2AVxdP2O5zAxuMPXfICNXheA0PAdEfct2Ags2Mk3415FZMPAwgBB1Pjr/\r\niRfOQVeaTzwKtsgn55LNPYbvrpHfBFK4QYSjOKtSOqKeaEzV8f0yAaFfOl7u\r\nRpYg8e7GmI7YXWcHHtIylfJDPEZFIlkA+mOb0QQOzZX4q3jnJPpeYaCEi9Gg\r\n3xOGvU1Mfnv09R9qVLgVuENFOmXTkr/k7iZmXxO5+/cHoiDvcnLPpDKdeu4F\r\nUyVdllCZomr4+1A8YFMBNfEc+DgVOzM8U4+NmmXqVwpK/kTEcgzf2YVv1iNu\r\nxQ8faGYxYahSZAe5Xv8DGtOTjcpETCJc0o6obtVkXCMlM7EPs0OSR7lP22Mh\r\n77dagT/NOeAUeszyRcbwvBtbtSIx2ctwV11t3OkrKoMNNhb60eoVoSCWIxV7\r\nZ/cM2k/kxNsq7mIxSMWkq67Ztv7uCakgKPS7OIaYjjo4MiKge6pClsGcroZ9\r\ne8gX8Qy8t8acZqeclXSdldn46I/eEdOTdqg/RN6iY9YzVnIoeRCkKUJTfnfM\r\nsmJS+jpL5N78ZZwBWVLep+bE535TKIHtPls=\r\n=Ba68\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"99b3cbc58cf1720f6b89d5c45d02b9a267023439","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.15_1670434448321_0.8031251747697619","host":"s3://npm-registry-packages"}},"2.0.0-beta.16":{"name":"@akord/akord-js","version":"2.0.0-beta.16","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.16","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"2935c9bf60535dbb70fb6944cf9260a366c93f40","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.16.tgz","fileCount":89,"integrity":"sha512-Iak+w8zGdDMSLP3g+VkvU7XU1aWZME2QptGik6VuYX57InMrOZYfWwUWrEcYDcyjmbUxuB36V0WlXYs066haVw==","signatures":[{"sig":"MEQCIEgN45qXCwA/+vxuI+RspABXXYfoaMI7O5rqx+33VPM/AiAfXCPBj1GoDNk+bHSFXlaKgqTdIChWssugg9Zq0g/F0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkizUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrduw//fBSXJZDJBA1u6ZXn4tCYGv/Uo/6dBZC/RvSs8vb1zKMLgfa1\r\nj2u5clkuE5FXhyjk2PzNSiPbxQkpw0xF6LIQMpmFH1QiMGmItzwC+L2tCkgc\r\nsIdg9kTnx7rtkrs1XaBkTEfndl6D09lSGbm7F5o0J4uJdTHSVPGWUf3Rd0xm\r\nqrgRaoWNH13p9LO6rfBBQuV0puV54tTOj+5iifotJvmOYbjjDqWbHUyIPJV/\r\nqkM0R3CARudjC/VJm8/v1dZQmJ2J6/UOOT6BzDASBqLe/GLdXchY575SkJfy\r\nZ5dqepsaJUApyuje/8mc5m+Wxzsa72HM8/N73tWXN+jdMHOAMFfJSKdw54F2\r\n9yHT653E8jSvuMW2IXIZQbcxfLfcwV6mhUQxrCwN6ef41Tg9SlkbqK9BjEhH\r\nP8cjuYmS2/ERBwnJnP4kwtC0UkRMxdEZ/lOH9WEzp+KnER8iv0UhsHu0a8RC\r\njUnhAp//XdVQiICqvaGWNluEUsYoYJiWWSfQNr18LNoJOrdWaFbq26Yp0PUv\r\ns+QM/jC4aZnkbZ9YH3pqecssO29+0h2tPdGjr2EtS0xu5W3OpsJQXsdaJAte\r\ncfbiFPyNuM16xW8LOX+8XTBEV8h3ZGwSYmTqpqkwRHNP0G8oVreFgx2heslY\r\nCKYlKgkcAwj9jbVJMjPpcBPoeXWn9Pi0hJc=\r\n=J8gW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"99b3cbc58cf1720f6b89d5c45d02b9a267023439","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.16_1670524116595_0.29727644697950817","host":"s3://npm-registry-packages"}},"2.0.0-alpha.2":{"name":"@akord/akord-js","version":"2.0.0-alpha.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-alpha.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d3b7203621493705d409f3519ff52b4a06c1d128","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-alpha.2.tgz","fileCount":85,"integrity":"sha512-+pZfWU3nYT97/rwd1WHz4N19ok5bWJVfxXC1Smud2vk2Bf+Pgf/e0D1lF0k6vWg3gMMN3IF9gCgbksgwTZYB/A==","signatures":[{"sig":"MEUCIE1fNHUO2/L2EFpdYv9kdpa8T9LI+b753fGuKoZl9QSLAiEAxA8fBJWfglfMnm4SQnuH9JtdPZU7UZT3UPyfvYeBvJw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkzz2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqN9w//f2wuoVsHo7FHSHwgUEghB120QkxtWKKCPOwq2w2d5eovgvhA\r\ny/z4MThtyWqOfQXgcSxL1xe+zJziJmLFbM5a3ZXxxm/N2qQmhyBXfdNKaiCS\r\nIXs0d2D8TsOf39rXaQISYj2BfRmFXAVyi2ONmuo2z6XK+X7nPvi5hPvKhwXz\r\nrLI5ZKwERjEmUDqz332hYzocb+kuP6K/143OHINboD1D4YuKeuntHynBXcRz\r\nuFWIMt2b6wX/f0zpEewqy268CeERGL7zB4afkOoOFqcMJxzrSAVXW+Lml0ia\r\n82x7KzPkcl3JkrHtXYejUEt8f1+HYFeFfRbuZ+zMEwZXNLdxEoihtEtZHVVe\r\nZQKJOLZ0sI1xx98gGf1pW0Z6wPXdwnxL8tiE7QKnEegJltZnLZ35HdKAx7+7\r\n7eBRx3ytGjk+zuWvRQQGsqUHbRJtXiXqvpPCg4hcld3K83GShEEvnIHwKaYT\r\nl4ECCfW9Q7TveLpnb56ZvytL5RKnP4kYwk9l563F2AB/jjiqqkuxmnkUnTTz\r\nbqJ9hOfOMu+f830lHPkPdW5bPvXt4gNm6yk/Z/No3sNePEORQnkTmCm5qq0b\r\nIhQfN5e2zPboof5nTPlD7m0w8Lnj2HzXEo90bxGIMLXKY/YBB433aCDwdcjv\r\n9cfZf9wEvIrsphskv2AFBr5D7JKuvWnmcVE=\r\n=Khj8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"b6c0db3a11feaf6c1affce78801e2cd8b981a7ab","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.5.1","description":"Akord Client","directories":{},"_nodeVersion":"17.6.0","dependencies":{"gun":"^0.2020.1238","rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^16.6.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-alpha.2_1670593782162_0.2117903695927803","host":"s3://npm-registry-packages"}},"1.10.0":{"name":"@akord/akord-js","version":"1.10.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@1.10.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"628edac25547eee29b3fe3260a3c52266133957d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-1.10.0.tgz","fileCount":85,"integrity":"sha512-ZIE7vZHocAbe8ObFlIhOPmJfaPlv8Dgfck9pr5GCJJtTALPUuINxeAgkWyMix2gyU7DodVqKbhRGNoYiPaGuhQ==","signatures":[{"sig":"MEUCIQCl0Q5c0fOfwq7N55AUmMg/BWvqEYZJ1qqJ1bL+NfKzcgIgH6w8SHkG4xwu3Avsx0kAPy4H9+GksoWYLavxldZnsqY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjk2VnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQgA//TXH5ovcBgTcxQKrr93pYulvqy18J++x2WDJLaHdV5AR0+ePO\r\nA4mzxTN+2i1WKYVeEjCDbGPs3IqAKYI72X+VZcJz4o0tlAWdgFaRhHurW/M/\r\nFKtkvpjdWckY1TQ5AKx6VNP9gzhuyIsD/ibc7bjYkMTmDL2mmxdOFExNhVO+\r\nFMQF1493Jkj8b1OeQurgcWB3aVdxFjpSZtimq9yvsyVuOMcVJanzR5R70h4S\r\ngO74BWbG+g08+npa1zsnzjsa57bnKduiXW0y5Nah6pce1NdqFLow1TP8Na/X\r\nJaMqz+OWjvpfgIrm7kybEtJuQ+1zzCMbo0AxQc5r/3FQ0QbSS5pBi+VsmWcM\r\nJjwuJfG07dFlp5Fv9zVPZuXbrxp1DeKHsKhYfuyw3gOr9m4Kyn5g8rxJM6yr\r\nqEjzo2/Tco2eW1T0EAdEorihxeCvwZ9sULUppMDjqs5raX63gEz0ViuVIckd\r\nYccC4q/uD2bIyO2j9g3trQJop2oa6Duqz5pd92d7+qlQ3HthgPqBeC3Yf9Ng\r\nRWhvvd7wBPQf9DsYzSk1iGHywkGgauM2qlW10W1BNCkUa1uMHBpuIgxeWLxS\r\nz666yu/kzGXR157QFBXovg2tDMdFgw8TC0SpcW3xKLqrhMpiqzjQSa/QvFTa\r\nWfH6a9/jdDIU8HBl4bncJQTL4TCb2SeH22g=\r\n=X6dj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"e53aaf7a5cda03a3456bedb2d0cb562f3853d717","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"Akord Client","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.1.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_1.10.0_1670604135647_0.5793723118930021","host":"s3://npm-registry-packages"}},"2.0.0-beta.17":{"name":"@akord/akord-js","version":"2.0.0-beta.17","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.17","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c336adc5398a40b1d3be9c4adc5b5080a6e3bb57","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.17.tgz","fileCount":89,"integrity":"sha512-uXx4LVXcq3zmNx786gCg+xJBbxhiqWSUaGAeuQ9AR3XjJCcJ09Eg21HOWwbz3448b3hDLKl4hFm+QtWb18QjJQ==","signatures":[{"sig":"MEYCIQCXmBMEgPIoeDHVZscCQv3Ctrk7cja9ujUo20gZGVdLIwIhAJeIAA8fUjisJMD71uOh1GQrM3+ivTStHMJs141rLnhT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmPqgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmZhAAiSaIRu7rx8qGac9IOkmWvZq1g/sh5LnEK5T24Hd5lxGY0PKS\r\nrtqc4DLYBK5FuB7WSzWUfHtTK2yjmw9pcB1wdrjZ3cCOaJabwzIncNsMN9qj\r\npBJe6hTi5O96ytbfFD7afZdSWhZRwfPwZ88v4bb041OWu1JEbAQoBWHv6dc6\r\nYEJXzYMnwRwwTjgaH3pP61yFAEYZqNBHcsqun3lPwX4IocYKL9b4OjK75g3Z\r\nG9LL1jEccUTAPqzwDLkGmhNnSWHjuR9mQlBsjqImflW2tLlr4p6thPxv0HRD\r\nJUOl8F9linM32xgEMWMj4Qeo/5F5ZFZuUM3Tp6vtrED4uqv2E4B+mt+zt/EL\r\n+742v+Tra3IFc0ts0Qs3HEl2LYja0VoBJ1XmmaaFxv3fRel3AOkckVx+HLRl\r\n7GIRTLe8Sy7PygxIQHhVS7DQ+xNEkHFT07tc7j8wttEBDHxQNy+mz7M0OhCu\r\nAGyGId3tKsDFWtJBwqB73zi0TWcSZspJkJ8+b6yqiqbg6CdiTpezOU2DJKoO\r\neXtQKpEbdICRXTY2NUgi5n+EmyLqfHyoSWMG9vpHic4EmeVEN2jTCdU7p7RT\r\nBdD3bzpffDzvMpwv0OwifTS5D0ReJubrjvxYi2kVcBRgQh0KZ6fsWOMpld6j\r\np6bqviQQhsdat4cACQqwV/y0t+l038QWi3A=\r\n=W+BZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"cf3a2265828d78422e0563746fc03cf536b5addc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.5","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.17_1670970016598_0.0340812556784178","host":"s3://npm-registry-packages"}},"2.0.0-beta.18":{"name":"@akord/akord-js","version":"2.0.0-beta.18","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.18","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"160643b73f2bdc40624e96346f96f0ec913fbf37","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.18.tgz","fileCount":3,"integrity":"sha512-BJ9y6/bcWq4TrDuP4ytfkeWUWx8uByaxonzOdDFG6tB/PdaX0oU6XUlH7FvUU9x6zSCT2YSfmhoA7xIRhReuGA==","signatures":[{"sig":"MEQCICeZ8HPikX7Eiy/yGTTuiGiX+o/yr4tq4uAcEvymyIhUAiA9GbBVFGs3ChQg7AnxakJHhS2F+WWxz05qMXL2LUH8nQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjma+hACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrqRg//WlWQRYT4s79XIzlwsAJ6liJR21HkiZjEjOnGuvFKyCbVbpdb\r\nBm3v1I7y0omFRO0FRhZ36w09uUvGH907e2S9lzspmkiUUI4EasUD7CiXvUkk\r\nlsQ9IpINcwlhxuk4u4ua54f99WST1ICQZsXYwPNP7HFzSu8KIPREXwF78US3\r\nVSLIUD4kyaN3dCHF9VDvXszY+Cilob8DiJED1Uj8/Ot2RbVpFE/f3maNJKDc\r\nLZ1gt1/gRYRQDCY4SvM/7uwgbXHT31XmUIAmBudNH8Fd+AZn1ma8CMHfO4a9\r\n+UM+A0PTe7G4KQV3m6ceYaKy8Tc0ANVDYTGT+pGPrcYyf0OQu+cND06vOe13\r\nGOhdMHifi8yaf5dA3SePkXNWSTBOiVI5OQcp5YlwpibvRNWewKMDzeyv6ynP\r\nYzP/DoDkpxYrb/bjT6SPMlnqMI0PK4TAONtyg551UdPdq2cINnyeVTXzQl9c\r\nMAZ6Fxbo2aAfQ0MesP0og37cWDX8/P1CjAeBgYd7nEAujtS/s3vrWhxofHmr\r\neol8foOTUa+8I85vsFLJ/P4g1zNn6tJoV6WrP9dfLHBnbTl6Vme0cOyU5fC1\r\numpCHb5//8NEma24Q9kU9zUP9SrXTlOF+vxbFjbGqnkVgahhepWsCqUWJL9p\r\nSZoc+BBMGDuU6gjDv0lharQ4/bFuXej1roc=\r\n=lR/j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"cf3a2265828d78422e0563746fc03cf536b5addc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.9","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.18_1671016353308_0.7556730001028225","host":"s3://npm-registry-packages"}},"2.0.0-beta.19":{"name":"@akord/akord-js","version":"2.0.0-beta.19","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.19","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bfa517c1593a066001c50aa5fbc41fa027b9f538","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.19.tgz","fileCount":89,"integrity":"sha512-tJT0K337/LSZ0bWAPEfvyGrqJPVE1Fwok14hAOhoj4+iWw5cFNCs3p/LUpYvtJabjA7hGggt924wBRx06CDI0Q==","signatures":[{"sig":"MEUCIFlFU3OIusNf/NjtMICCLSRBqZSLwxyNzfmvmwhab757AiEAxpep6Aj7kkPvefEIE/U+Fmq/RXwCWDjIOwXI7oxZAfg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmbc9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmozZA/9GU0TkIxfWwbdyoqjMAuKy9Fjt5X/ViBYYCZxFQyUp2TmLbGl\r\npXTexUi4amgSR2o0QZy5Kt8TRW365A0IOU8sD25svil2lAZ0ih2p4wG39ajJ\r\n4Z/9QN+lahXEfIagUcH8055BxiMN35gptf+oP2sZXX8yW+cDfpYLT1J+9NSY\r\nqBtOl4cKDvexcKLoq+QQYVyKfYC308Xs/xoh1xAQkfo8y/SGMmmkqqKDinkU\r\ncFTLspUuGwJAwpcMfGDIjhhEijpDrPqwH2mUdiWi7xqqfTfDtTWvufZbZpYX\r\nJ9oRKWVBH5ltWKVTYt0FqFEMcWy563QUr1PQlA1afLsxSocLXBJKzk/+NwDE\r\nKpDicIbGPwXr6DalmRex7s7oAxTbL1D8OpIAbfPymTilA4rBvMt0XcGaxYOr\r\n3drfIkgu4qRrXljuDNwkB6vV8/ELNRhEEsxLKw7fvPVkwbuLQwfOkUnK+MHn\r\nki3wY2luNoYmssU4kvAvPeY8lr3ZCCqNtX2Ys/vY1tlsL2Ku0UQfPrboc/wI\r\n1dmSbrDP8ZaVf+rnwMa0Xr1b2ukkWj+iEX2xPiJv/bZNXiI0PhqEM0C0kFz+\r\na/KazUo6F9MdHUzSMhfk6yUU4BdJJFhy8Eaxxkzo5DPx++91czmEXohTEfRB\r\n0u1FnOxhPLv6aIsYesZAiX9GYZFwW6yPxTM=\r\n=+1AG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"cf3a2265828d78422e0563746fc03cf536b5addc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.9","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.19_1671018301395_0.4326298816864824","host":"s3://npm-registry-packages"}},"2.0.0-beta.20":{"name":"@akord/akord-js","version":"2.0.0-beta.20","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.20","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"df51b19a9fd07471c03fc13fecca89c0e63d3ca3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.20.tgz","fileCount":89,"integrity":"sha512-+/NXLlPu1E4e27feA1FFdb6RPNGupK6A0Y/gCtL8uoYMTDx5tkWKD8oMxLX2vRpy6YBl0kh22/I+VTVhhuql1Q==","signatures":[{"sig":"MEUCIHWy6QY8ooTC7LGGmHEhQGziwMLNChb0xByI3aBtsq+yAiEA0jqM4Nz1wYlHpFOXNOFTCwLxpzepb+ajeWzjX/TW+t8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmccEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpaiRAAj+T0J7PSCF68GwT/OsgW0hHje8pyxI5ci6cQFHfYdYydN3s8\r\nXAScsJs8WjjKCgP1KQJeE7n8J8/Cq5qtNa6azT4emIQwCkmMU4lw41JC/ebi\r\nislYunvfyj3zBDi3a1qqA4YetsLydGVvF1O7EAlrsjORYUYDc8o49lAHzoI6\r\nPyzVvKLCAVTLXIQMizJzOdBFHVCsK/ZT6nEQ3hFC8dK39W1LEUb1arfPaqMP\r\nnAGreZTyt0b9Jt8EnPrP8zlLSxO7JwYYqqG/yE5eIsDGLsAOjiqwRlPkbgJM\r\nmPCUUeMm40zH4QMObIjfvLystgDISjUjEmaDhxYHESgrdw3kHi2KClpDM0ZG\r\nn6QIl6aXGsuvowScPeHTXiN0NdtE1vL+D6cv7m25t8R370hCioM1lVXOREaX\r\n5Dt+yz+CldKeMi1vjcfIaZKONRzBaup5GGfwlWYcIYV7X2p5IyzrBOPn/7R/\r\nkd9itE3IFltHcAMqq8yVM4RH1fTqo4gBUxDxKKz+fuFV9WSzH31R+0/4QkaS\r\n8Yd6ryJwiMqcgyJ7/CvfV2Zbej+mdBWfBQv6RAu/rOoX1Bzpy/yC/NaLA4bk\r\n6jajy5rDAAyBPzegQbOtVH2GV9dBvJkA5jpYJzCMiXuroZW09iDEf2Gg4Oy0\r\nRVVYubcFyYQ1zdtv7JU4pcP9gULGXjlTCsw=\r\n=EYJS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"cf3a2265828d78422e0563746fc03cf536b5addc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.9","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.20_1671022339783_0.3195185434158503","host":"s3://npm-registry-packages"}},"2.0.0-alpha.3":{"name":"@akord/akord-js","version":"2.0.0-alpha.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-alpha.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d1aad6b91d606f11a268526c2053166caab1251d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-alpha.3.tgz","fileCount":85,"integrity":"sha512-eBIeavhQRozlrOV5glctFi07c1hce4KB4pCJYDBlDA/KlOEQUqTx4XyZRIfXxxm6AIAsKZ5iyXwPLc1SnrzNgQ==","signatures":[{"sig":"MEUCIQCOsfx51pVJD+TSWCsg8/wXE89LjUpLQVbKgoij3dMPCAIgEMtWvTN4KpFX5auVJemQwc8RXAsPz/d94MO33+RZt24=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjnGaKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmomag//eeKiozo/wBJibcY7Yvp50mutGKdK8DS5m/isNUcCeYa191QC\r\n2jmv2p9Zj1Ae+MbO+PLEm2q2XvwNm8Ah78fLDjyoxD4abD2FDgEeF4mNLELF\r\nt/3rYI+PMlB2SYCStSF1v3+pYLVk8qqiCT71eH4YI4yNY5AD+JIlXsh0rtK4\r\n3qUBjmb61C7/3AJNpJcAyQ55CiGzgCzApKDHMZgAfJijB+EBCyvCb7OkoZUD\r\nl2IEPh6kh+OR7PDiESbQL0WH1QlERVA9B3MoHIg5fMwbQnEN7JEAlTc8S6EU\r\nYYqqiQlTuPrN42HoC33YsrzIgfW7Yn8atN+8u91k8sYn3JV0haWKOKBXCzzO\r\n5ZFDdB0gTrzhHTeYDQTfu3MU70WJDu0Da3HhjcRMzoDi8jHlxSnlRI0KQotm\r\nLS9jCBHXtRTVd2DfTiAPePCJ3tW14YJpP+JndoqkytZuKQZRtQEGkryJN3gh\r\nRVrVhaN9/j7l4GPsYoaGovl/yPmnb4sXDSrJQBx0gJ0AEPRWpP8zsA7T2w8a\r\nAx4jnDQQMY+tm9D+4iDpUGWUMD0gv1pAmypkn6a3GzmidP0CFP2pSnJH+1IV\r\nzI9N6mnK7jMnbe+0JvePzzTARxchQf7y8phEfHVzNfuoAfG3wwzIhAIfLfsm\r\nIq1ZzPE3r/QbylV5vycMOcZw9CRjtmQjpXs=\r\n=DRIk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"06299bdfb03b13fa22b940fb530e4dc03bb686ab","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"gun":"^0.2020.1238","rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^16.6.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-alpha.3_1671194249913_0.20701794983459032","host":"s3://npm-registry-packages"}},"2.0.0-alpha.4":{"name":"@akord/akord-js","version":"2.0.0-alpha.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-alpha.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c6ea64bfb2290ac9f5f8b3a0797880c9321eafb5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-alpha.4.tgz","fileCount":85,"integrity":"sha512-prarL3aLUCb1p9gcWf/feb4tQnarqn6DzD28ByF+mSXNj/q2Ct36Kz1oDjK1S30b8Sh19+qb5I/DVRS0/zZy+w==","signatures":[{"sig":"MEUCIDM0RmIWWnF4Hsg51GAWymSaFfjinG7dKJ0nCHIrR6TGAiEA0veDHBncVOfoFhzoyBYkBw9cKDLqP2aESbIDnRPPQLg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243450,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjnGjXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4Qg//azH4DF/U9n01u4i2ywKawlx0PLWQP5BYutFQM1JawBPSDLnc\r\nOMyyK7fdOekFvO1IS1gK+VblYn9d6Hmi6NpdIiz4F918mvTugHGfWtI/x6fU\r\nWoS2a04GgpkR0/JIKQN9/TL+NDOlRMkV3s/h9BTJSX02H89Yr5a+5jencv2g\r\nFgbMl85114y56Jvh15S/R4x1FXxkr8T7XZRDeL+fxPOor2M+7gMimaeO6djj\r\nClJYPcOABEw863Zz7HFVlZDQCpE6uGkZGgUGeYDtEzKKAwbglPLm5iaAbiha\r\nzYLXxpDjxDboE8cSO6EyLVBsqFcCk8keeWr6sOnX9rAtLW+HSjz1lQqsWCf2\r\nh7L2Cai9g6OMY56+AFdp3dkMlSs2s/1zEo5hZ3r6nq2fVow+SNyNprXRXXDG\r\nIENCnRbeToTq3+2fiBt6LNwSy7Ep9oul+oBPyypcIbjnO4cvOL8FjBu3Lunw\r\nnvKw73rOzLPXdfoV/BVHUWM3tUx7B1jI1FNwS4iYcKlpqSi+rloVuqQ5cT9L\r\nqBEstRVvCgnKQl5KMwvSJxnW5qzk1fncNqpfkGEezCUwjuBHhF2KftpDHl+G\r\n8CTEJkUBL9sLDtJqslsy4rv9H93NmAv9zL29i8A/t9UHQyUEmMob68C2eiu/\r\nmIprLDWYRjsE6ydZ6K/JihwTkazivgZCgvU=\r\n=5wxl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"06299bdfb03b13fa22b940fb530e4dc03bb686ab","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"gun":"^0.2020.1238","rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^16.6.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-alpha.4_1671194839202_0.12380507194927315","host":"s3://npm-registry-packages"}},"2.0.0-alpha.5":{"name":"@akord/akord-js","version":"2.0.0-alpha.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-alpha.5","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4bd8d97a24e55b74dd4db9bb9d75c70cdf3fe234","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-alpha.5.tgz","fileCount":85,"integrity":"sha512-zdQVzQHYCbYRXEXGc8RfVOhfKLN+3Dp5YYcfnmo6CDqH6lUpRt+LpdVzKMDFQw8dzmMzYR2UHclxRjpzujBy7A==","signatures":[{"sig":"MEUCIQDW8/jsCzAOtDt22LIhilV/nPeFUXSu2f5obPfZ3BuZNwIgTTqXXV2r5TRfPlnpe87JZ4TpNVmv8z6JJxm+GpGgrt8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjnHT1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdZw/+PPSUfXiJmV/AqsaEN80yHRL2om+Q/T8gJ3f34vnq6ripNH8k\r\nbCDPoh+7FyybCavnLou6J6UpSM+kacqEF05mBoJACM3wbescHNonk96wUAhq\r\nNAcY3zctEYnlkvWlUanW5RY5Lz6Zeo7U3gmibiS+FzEcd3DQaL96qCw87u8A\r\nCaxs1KscBvzEp1vd0+vmxmwk9nLm7PVn6HauLT88Orjp+LRiGCXZh80LkakD\r\nuZOFn1Q1XAO7azmBoLBsNxpKrv/XH/ikv8qJohafx8jwWh9G6WBOeUKWR9JY\r\nmB63v/0TYNUPA/z2UvQDPyat3JtMTto+ziOiSu1tGrl/jnwLC7Cs2hvUbTnJ\r\nXpysicmLD63Fj1oM+cmkRMjLk67yf1wJsjf3lXeyzD2uPwoQyTrP27AupSdg\r\nHPVanTDmdyUctqdILWeQho2Noe5YfclkSqsFsQdHsnUB65hxlJQTSp3jFj4q\r\ne9ww5hFhhuunDYnaOwtxwoy4C6uYwX4Ab2CHNPULY5DvIOWSPAVgH0u1RtNi\r\nhSPRESf3Xhi2EqaTMhSQoIZ6R/FHMv4FL1hUaueW7o6hag8y2+/P1OkKaw9k\r\ne472xyn3Y84PSMdmqPjhV2WZDWU5QG76XiMnZK8t+iYNFljMiVirv9Hbk2RP\r\npDm79+ynvWWhx/c0IVUHrAg5Y6Fwycqgc8w=\r\n=gIhh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"06299bdfb03b13fa22b940fb530e4dc03bb686ab","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"gun":"^0.2020.1238","rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^16.6.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-alpha.5_1671197941444_0.8100638142377621","host":"s3://npm-registry-packages"}},"2.0.0-beta.21":{"name":"@akord/akord-js","version":"2.0.0-beta.21","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.21","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1a77651ee53ee09c4c3a4aafb55ccd867bcc6409","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.21.tgz","fileCount":91,"integrity":"sha512-yQRBXp6HOA+3amt5r50IK2AXFzF7SBfkPNKobCoBXvMXsE8dgt1FutP+SeCENt+DPrhLFVtsSxDFBT97WkhPOg==","signatures":[{"sig":"MEUCIQDs2STumfkN2dFVAuxvPe2CkebXquP5wmX+ifDI+M/0BAIgCDFzGJQaGVs9GAWT+UfHsMxUMC1cUbXCZsuhPP/X7/w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":308478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjnR88ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmryHRAAorEM+Yfvt4i/euVEW8PlQf9nQkFZYTlBUuhMt/JrKf6ihjb/\r\ntHe/i2wflpIRJ/cLUTy13NV6Ug5a57NlYtoRoQ5eSOFoexOd8EV18ibHYgcs\r\nJjZb7N0LWXBqtH7DfMNBcYEZ8AlhtfhMZpoRPjiWJpPNS7B4o4c6swLTb60G\r\nfl68I/FXJqqPXP+yCbldsrdIMAdReC+hNRZCJwETg4Cz8k6NgT0hbLeoacw4\r\nKLbHINKHYrrOArYNvrxSKL7vDL0sTMRr3Z+AIfMlAUbODn8S67nAVKfrHw7S\r\nhfHm3JtGuUUqpTPje7Sxb4h8EtPxGp1ckW1JTQnUBJFLyT96nt13MDRtBZOr\r\nvatMJm6yXA1LNQZ9EPNU5S8xqZdTlcCK9406u09X6kVhxSjEgy9wsbn/vF1O\r\nbNEBsmTdGZGYqv70+1d1JqdqPMzWRrXXzUch9Qbs2wzM6+Z2Fg+wIonFiA5a\r\nRChH+sis3bqxWlZFW8h0Fta/ByPBkLT47cytd7TbLL3EABXBPhh4b1C1Xwxh\r\nhMSrKoO0B7kzN8gKVj3OmKGofHSCq5HjceKH4w5llG56x56LFLKatrnTPV5X\r\nChjxTv3YPSMeQMrCtEP+GpLPIR2Nw0dxfEpDHG8QPkUt4c7iPoB7sd8PD61H\r\nIeezBY7qnUkzh+lQdjIOJzVXZ5nbl2YHG+s=\r\n=WwRh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"cf3a2265828d78422e0563746fc03cf536b5addc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.9","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.21_1671241532767_0.08812865634780498","host":"s3://npm-registry-packages"}},"2.0.0-beta.22":{"name":"@akord/akord-js","version":"2.0.0-beta.22","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.22","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"17700c52396f38dff6bd0f46582f81b2670e4d1c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.22.tgz","fileCount":91,"integrity":"sha512-BcR7XXijXej5nnq0ADQVDo0Na8MhaWRD1czdRp7UsHnNjjt3XcLufM5ETyFXPgvlpAGlFIK+9vx9gVYJHzensQ==","signatures":[{"sig":"MEYCIQDc6NJyrtyScNdyWUmyfqkcKucrWkENiih63NHt00FcdwIhAN1PbONAJUJrIzyp6PV2RilsB2joo6gQeraeFaC0PFLm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":308550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjnSbyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNug//Vy2yurHVPBgpftgBzxnjE4MXwMRFlqFBDq7jbe0ZTWIf9qaR\r\neALrvx94MEFC4MbkZzxaT1Ckbz6Z725I7h73cdniDReB20cBIT30FYLD7jcX\r\nhIdSNXTNHiXPxTcpP2f2wFjED144eFPdEmfC8vf/zOc8SA6qZXT8Wezt+NCr\r\nvYrCoAHMf0y84E79Q4tF1Ww30AcT7M/0bC+eVmmPV343+rD/TLd8RyGEuDG1\r\nCsQ3Km0em0J0eRo635KsgavLhgcWm4fIj4pKqA8DvU1Wmzh0npSYUlLWaz+4\r\ns/Q98/SjwhmEAKzSv+hozMyXVXEWzJfPVkHer97TaP2loT8bjSDdjtpkVxM/\r\nP0ja/AiHfxGMy5tQabVbf7+7ut80FvPNaelJ8Vq0ndqhOkJ7z/SjL+Xj7b0I\r\n2zYF3lCWJkNG0ko9Xi3undzkPRJ2Xn+x3Ssk5LL4T0DgnHCOW/cMjuFf6X1M\r\naV1buVK3Sx4yc4zsOUmIEj4FEZrcchtFlB059qbm3I58x3MAPDjsAyvgVh+5\r\nCs6Ah+aYoVqQjm79ZtUp5VLZl82yblFORCkcqKzXGvADqCsozv5DbG7PDu6D\r\nPhq1HJPF8SFqH2L7g9JCR6J9PRRN8GdRjwQXr/ETP5Ls0cyxyM78c6Y6VQlm\r\nUz3NmogBv8tkiZjL/f7hhKFP+0ssbE8FcqU=\r\n=mM0G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"cf3a2265828d78422e0563746fc03cf536b5addc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.9","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.22_1671243505933_0.6089225018195796","host":"s3://npm-registry-packages"}},"2.0.0-beta.23":{"name":"@akord/akord-js","version":"2.0.0-beta.23","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.23","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6a072fd7d6f66050d122255c32831fd16f8cd75a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.23.tgz","fileCount":91,"integrity":"sha512-vycn6ItfO24jzJHfg/ovzi7w6IeigC1RGAhWyhw06xEmQm/jekOPjAfivC9RP5104SnzplhDa36/DhtO0H6w6Q==","signatures":[{"sig":"MEUCIQCwgUD0pVH04HPfMOuHRdPh+Avx5iJLLLlK3i0zLakDywIgXLEesH9xwKyJ/1n9i8Dr1WWXURA+WVG37b7Z3zDKKzY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":308543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoI9tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq9gw//XSwIQ5SDPyoLUNaDy2n8++NkF9wW3jEGtVioPDSWjXnu5h+9\r\nm84iAdb4oatXmrFbnmG1Y5x9RzlAxocBzYcpHP5TCtNwhmd7kDK2SwTjXh0/\r\nOQcQHuLa4G5pcgvyd9y4EcoWvd0eFywo9x2QkPjozSgJ/HkiWW0wg3kCLSDr\r\nPPuwVmjByCsYixsf0FwaoKYsVjjyRcjhjYLtuJQ07J+6veJG3BKNpxWpeirQ\r\neKyP9erIdns3Fq8sNaQykdHS5emOUvanoUJIJIJVwTJguqsJ8IkOCeJIQkah\r\nQtf/HCrB3SyVdVNrlQ8sQA8vNSL1o0hJ6XrMt1v2X43vDLh2cZjG0Z1xUFur\r\nYAyA6e3KynPWL2y5leU+QbMjdNUXaA6GcfcK8d0pqMrw2dp2wZyUWoCKaRxn\r\n088g3keYQ13bAizHOkzC3yQuclRXuqsV7IZRufUANP7yrNSx/PugrEDvUDqe\r\ncWK3YW9GIQ/0ynPA9+tVU7SIPc+JoEYpI6gCgVQt7nLjo/ch/JR+PgSZybya\r\ntuWz0Qss2hYIb2azErEXsS4TU/kryBcS5TZf453a/vNbVGQhl9KohZljtLrf\r\n69tt+nUrtFtl30C8GWVFvTIFg4B8+bl2l178ukPbPLYIR9EBBWqi6lejLVXL\r\nCqAiGeLrKmvxc6TXtFktKgXkwuViB34+rlY=\r\n=xpdi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"cf3a2265828d78422e0563746fc03cf536b5addc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.9","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.23_1671466860904_0.24853008044494018","host":"s3://npm-registry-packages"}},"2.0.0-beta.24":{"name":"@akord/akord-js","version":"2.0.0-beta.24","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.24","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"05273ae6756f8512c60b2cceaef2e2143bdab35e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.24.tgz","fileCount":91,"integrity":"sha512-dcTn8Q6D3txpY3iISN4Loin3jFbLYQeZUbJMQCkTJJ3+LwMft4AePfhoEQDG0ik9nJB5NJwqdA+um8BHY1RFsA==","signatures":[{"sig":"MEUCIQDV/151Yql7Zi9sDJ1Moa8vhSjPd/WLxMcfQ5WGNNi0vQIgIxiGi3y/JASzF2dywfugcosGlYakboWjBG3xpic4LtU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":308701,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoJAJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmosnw/9GRxk/tRmgKfhoefzAGpLWLjajKERcW2S24vBooqWO9YK6TYc\r\nkPtQM05mY1ESz2eQ0qfj9wmcjoHGgfaVhsbVICLbKGIMepu9wrC2eLK5ZFag\r\n9UZSUM8AKF78dxX0kBtyX7JufCvy3PoRjFAhKDTIFuR8slH5RIWZR4dvNUPv\r\nFI+JD4J9ofgJWSntqCC936E6MVcbOGciPA/wfAbs3yxVLBGgVMx83bWLfo44\r\nm7VY9Bi/d3fyWWmn0IUfRqy6iMmCpV0BYnSsTWu/3ZOBFNqEXwIbv0BnTUbE\r\nnZ0CNL4kLgSrQQvTAPH1fyj8NuMoVa6+8hUdMYUtxKQsRiyjdKzsjidTdq5w\r\n9PE0DiltzZb91KxGPxyySTCt64rovCX8T8mvakXcHHp10EKPk48cvzCRvkOv\r\nZNQgqyRnXmNJYueyqm+IhFzxcuM/wzML6e5qisedRTR8CygOZt0lxXkL0hRk\r\nBVH/7PDR8zlnU4hw/pSl0ZN593Np4gZ9S/G6wGSh4CGDYS2kM4CgEMAtVHop\r\n4WR+X4ujX3aNrKrHiQtknBnLm6KSH05BcDVzz16z7+g55lthWqEOqFDfZ8rc\r\nctLlEklMDq10VzzubxmENWlq+fknxcKSBoJm+ydlOJ6ODzblP+aGhgmnAko4\r\nXmovJQ3tARYlJ+UDA80RLqN3JFayy4A69GQ=\r\n=A4lm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"cf3a2265828d78422e0563746fc03cf536b5addc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.9","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.24_1671467017052_0.27520538175598097","host":"s3://npm-registry-packages"}},"2.0.0-beta.25":{"name":"@akord/akord-js","version":"2.0.0-beta.25","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.25","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"87c7bc428f5a27865cf472a11fb02efcda9d4eab","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.25.tgz","fileCount":91,"integrity":"sha512-UVw1NhH6Vm73CsizRZ88OOUE1q2XbqHlGP0WAKIEECKwxElhb2enkVtrotPQV9hethnEDO7JuGGPAW04IQGGYw==","signatures":[{"sig":"MEUCID/9OYC6F/OjCmMVHJ0Aqn42ocjR9uJdeEDHD2mjPjPfAiEAhNeIEAHxp5S4I+hhzTPS518/YE6ZKoFJUJiyuS2XH1o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":309583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoKQFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmodYQ//REot4mFOCLa9sC5aW1hVk0IqUM2zaZTs1mTpzpXN9bMOXurs\r\nMYk7OkS5SIRvy4RSW7RZeUM98T1mSVJqjcJQxl+X8naZ6shW9Re3KE/mGtEj\r\n75nfU5fcIUqxxvt/w1Y5qH9uk0Qf9Td9mzX8Lb/+I/SosXb8ljdQbHGSA4be\r\n0Zt8K7FSbQvbY6Yn2B56tAXfh2g5D1uVPafddmLJwkhl+EuWBZyOgQjjccmo\r\nMDL6gSn1+1s7WdTgoEd/wrot8WlwjQ2HEvmUOKrR22+ze6cqUpYL8sy7ARfT\r\nidCe7G29Ugok4loaIeTYdG06Fwf+5Jp34Z40v++qwdkrxPX5oXP0v6JISwoh\r\ntc9ZqRPXCoH/Q34SjQA1UBIUNCcldjClF66mfFbdNYEtsuwOdarOHDtXzBNX\r\niwHPVX4BUUZs4WZLCWH6/e2yzzU7N2UtxflQsEkBMt6FeIiKqeO0DLYAOrZt\r\nY9gMipgxZxvO9TRNCYOJJ65DdmNLEdgtZZIb8G9XvbkuvM0mWfMYK5wIrsaP\r\nsJw3AGoS32UYvC+K1ifGnDh70PPOaEmBg544FzRp3m76LO/O9oawPGYdNhR8\r\nlVo54FyoZ9zdvfRWpdskzwyYRTKjIuKPSRa+4z/z3c4hyHtNW+YsMCJINxbt\r\nf1UboWz7ENv5EbMuEROAK4vvXqhFaVMMElU=\r\n=g4xR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"cf3a2265828d78422e0563746fc03cf536b5addc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Akord Client","directories":{},"_nodeVersion":"16.13.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.9","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.25_1671472132951_0.19187339140244086","host":"s3://npm-registry-packages"}},"2.0.0-alpha.6":{"name":"@akord/akord-js","version":"2.0.0-alpha.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-alpha.6","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d158ea4410ceda2f13f3cfcf162d11960d711bfb","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-alpha.6.tgz","fileCount":85,"integrity":"sha512-7Vyndx/WX7gwyFh1AQ6+oOnAIe/KJyYndkuDriZDCuc4d4jIV19KqbaOAbbYb1Lw76FNcEmCAtTjCLYkwMBF8A==","signatures":[{"sig":"MEQCIEQbebc/YSWfIYZQyv2FjJd4qjGbghOanKVeuT+XucZ0AiBgU6y6KGtuHRVlki40TyN2qwjDdzUz+uuQfrOS6E5ypQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoXxSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoxThAAgKCkcfryoCohjcpz8s8vYjU6MKesEHgWm0uHDpWrvUEOxJTa\r\nSTsoSNb4ti4EapDiTs/pqsi57U9ufDLNx+EjRTUlS0NZbJADy7tHEo7ibXI0\r\nvWl6NQrVXOAs++ew6P7rDkkQzuut8uY4lDhNAr1/5j8FMx0FC/8AhJV7dKp0\r\nLoAixRABnw4ggUkK2kdZ3vWez/huhzQZzYvi80xqYIuxAOwhIQQvXjmRgxIb\r\nTQ7ZhN9P/ACTnQosKpRHLCKIQ73p/al/o+jeUdxdvPFqcHS5DIoCG6cIUd0P\r\nIdfzJpbNcBDZUl5lDZLft+9rSKiXTu04zFmtXsmUfS0PskTrYLlFPL1urQ/n\r\nsgWsgfDUzKhe3mjre+I/PF2rkGOQj9D8jB5nCUnK7J6frIlgKD8niz/aXv4U\r\nyCV5EMhDLK/ZlLIBXc7XNGko5gMlXwetRrl0Yg15gnQcN+IoLbFayaMFuq7n\r\nhUEFZJRKhxL+0DyJVlQwjglxUHwfJ6ucD+6W+F0bc7U0svjdYSgGGqrko5UZ\r\n9FoZgn4PjwDmYMtMlMDxl89vN81Ew3WCXgoIBvrB4KBJmAc/wqyd8+QE3hQa\r\nzVzrKPZw+rL+Hvfq9L+G+soKes7ydB57v+egPrVu+mr1Pii6g6RNg/eunTIF\r\nYOaq1l8gF1hf85ty/dxwAKPiKtcHs03PB8E=\r\n=t3n+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"06299bdfb03b13fa22b940fb530e4dc03bb686ab","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"gun":"^0.2020.1238","rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^16.6.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.6.0","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-alpha.6_1671527506613_0.6491004966450324","host":"s3://npm-registry-packages"}},"2.0.0-beta.26":{"name":"@akord/akord-js","version":"2.0.0-beta.26","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.26","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"43ad02fcee5c670cc1e354e872caf17592da1ffc","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.26.tgz","fileCount":91,"integrity":"sha512-EVo8Da7wuI4+eYKaKGwyJwXOpeu9g69uuXqpMFKvEkX/8OusRhZiRFcZTd76i+kp4w/im1Ppu77ETk+vCOiETA==","signatures":[{"sig":"MEYCIQChmPPL2bmujwsXYlPRdtkh8rrYhlphpJRob3T0aRkJPAIhAJ2p6C48eMPqKLm9yncCdH9OV3r5VdorB6c/hFMYxNOj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":309897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuHHoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZtg//bzKQ19xUIay0hLXMtg41zsDrBGXE2dZYwDhOjCtqEpCE8uQi\r\n49DYTvaBeSZurZW6oSjI06GWAByXtl1f+BxBG2g3vlzHG/TnIJT4tYXp56yo\r\nMxgwIxisrP0GjONVeY3Ozcxtagt0gMe79dYOTY6xCOIeUryvS/SazOpMpj24\r\ngUQklfu666fq+oYhCFtrIUVNQu8PKiUcn7MKPxyekcqdDVTdAjofr3FavD2D\r\nL7BzF7iubpeYbj9wd94tsePnkG+zCmv7mJjtfvb0ROaC0r0b/OY+5RLxkq7m\r\nK3x6I3Ze7PhxNssopY0wpeTzsf/fg75s3NuDWw9s8a7lzG/wDGKydFJk64Mh\r\n3agD0mpjqtosHujQWm0fIRic2K1Fvaaeo5KtBp5XVRzL+zEowfOhCQ3QPs9O\r\njYppLPVEJy0qgE5Thw3DaUI/OS5s0Vb6j4hcCyQxgYDbzbEqcis9VV+5Amf3\r\nnVTR0skGXRUJ3W252hQM7+051rM2RBPS8PtstoT0ju4FxdDw2G1vCnENon4Y\r\n0LvuFToPZ69pks/BW+dW63jzzPYlvXWwXD+4KBYbk7JfPZTs3GX0zRe82e7b\r\nGhFIBZBIhbZ0/m2YGxZ8CcplJuXxDYo/CefAU41qrx8iH329a2sIp5hzi9Xv\r\nY8oaXgSgGE0/Gz7JAUo7wkOo8vYzyOSWGqU=\r\n=clnJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"cf3a2265828d78422e0563746fc03cf536b5addc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"Akord Client","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.9","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.26_1673032168642_0.7293289529644487","host":"s3://npm-registry-packages"}},"2.0.0-beta.27":{"name":"@akord/akord-js","version":"2.0.0-beta.27","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.0.0-beta.27","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"aa8972a4673b006ed6ef104a39f677c5e590d38a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.0.0-beta.27.tgz","fileCount":91,"integrity":"sha512-AW53OuymCMzAsrpg4SfLgIZx8Chi/THx6liQWSE4x5SOT0Qsw4RUZ8yHY8Wnwtb67+mijtA7Q2ljZ2jL5F2/YQ==","signatures":[{"sig":"MEUCIGFZGo3FKcksqW+J3wpr1WH1vAc8iCSQa89g2GUe8T/QAiEAiWDQykQ7LLen8H497GYsKY+7RFSQJ8KKnSeCEUL5Ujo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":309958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuH2xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgFRAAk6CNsGk01xg3YQFMJ40ublfjE2ZG12hVAW22wOmsPxPXJh6Q\r\n8/WlszuGUY2HrwqeZUyuh4c3eEl+ACMcnQzDQ6lujwmj27gciXLjX7+8h0Ro\r\nwltj8QAxmoLShIP2kiabIeBATjQDTzDd7e2txz0f4gUltlPtZy0XYzqsHGVb\r\nZf0fMihlW8W38aW/bjWD/1FU760wACl/r1pFosLyvCB4AhaElIT+G52hAwrk\r\nRTvKlIbs9TXtqDGHD1ZhlVfIYMI58KixYqHad5UiClCICZqJwfn9fay1XnVQ\r\nn4mQsKUIgA1zyvgGXJwledyVsEtaUi8Z+z9RfrQMGjzVeefgyqfPp2KeA+jG\r\ndv/IoWnW2xlWoIY/sGTSZYaaZ4glxY2VMokzUEHz1aQDfqara76ub8TBrt2O\r\n4dxqJbSMRwvXOyXYcMRpJo3q7AKy58TRrx7TodabhyAt5UPxR8blcAZlf5rd\r\n1Ag3eSS/TkUhNbo7KH9mTKwQELbn8WXm7iv3P4OLGmASYvLmq/y1ysC/RkWl\r\n+W7n8nJsld/xQcNILaL0zIJtPMpI7TUr+XVbvNSU2RwLKf4YqwH5nHzUIEfJ\r\nPFd85lOYRU27zURvuH6naeSwMu8wQtxgTc1XdcUkubilEkh2eBtXSgr1hVei\r\nZ839v0lJcNbAJwRX2GnHKp+g6JsmgsJGSTI=\r\n=rUee\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"cf3a2265828d78422e0563746fc03cf536b5addc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"Akord Client","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","arweave":"1.11.4","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.9","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","warp-contracts":"1.2.4","graphql-request":"^4.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","@bundlr-network/client":"^0.9.0","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.0.0-beta.27_1673035185112_0.6759193628278446","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@akord/akord-js","version":"2.1.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.1.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"993880afdd88734588e99fe222fa049a0f08930a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.1.0.tgz","fileCount":77,"integrity":"sha512-pwhNGSqV3WtK3b3hkLie5PAzey14dO9FVKXRuOu0LKxy/OBppMX2ALERROgDnYWj5NMsDD/g8UY8/AzOmvKItg==","signatures":[{"sig":"MEYCIQDT6iPHRTeoqPQgmOaxO4oqJHlxHhfbLQkw+2rC04iAkgIhANgestf+ifcASPBsSdk9U0kXDK7wwOtxAh2gon6Bovin","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvvs6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr5MRAAlo9iaRa/NMXS6CGQPv0gAxPGQogn27aj+wnypVJKlq14r4Q9\r\n10KKY/1HtwUXPUUgOfgNuxFgsMPCpFWr32HbKsSSpWxM7udQla/7QNc41uyp\r\nIJklDsln7iYt6ryvlPHG4udNlm2SCLLY0YUx09MxTOyXwnVZdUC+ueLR9nX+\r\nft3N5LxwPurjt5qJrWeXSpTEQC1MOt39Ty/xUvs2i14qjNmVkZV97DuLpMFm\r\nhUXL7Xfl5BXmWRV79JirOP0To9Ly8NTOs5Jr+dPZ+EgYrxWS7lM9jnGT/keY\r\nUkplHX+7cMJb9b0x0jaszK+mHwcSrqLq+8oSBty0md7np/YIdVeFMuXRujpB\r\nDeOWZ6eT7jStvzbwuhf0yfZDgsKytHCI4pGJR1L/ZFyFyaFILRVyWz0W7MSz\r\nAaO+zIOXo9NWzMJf784TCaN8E2wZz5YWRSkQw3C84NTgzAcMBjvOn+2s2X9t\r\nCinGxbzgMJD2AKOXtPYfCKwRMmIgyBELriw1sDWWzpXANL4P/I4dkqmKCvDW\r\nuA9hGYRi3j4tbmOKjQEJd6pM/H1UBHNkJfXxAZwVRavNtOg7b8c0+x6qi4X0\r\nivCrwsNQ55InCXRWiwKmlX8WPYpfk28RGy9k9Guf/Z9qu55FYC/pAOxQIEPI\r\nvU/INfGfdTxOzOXP9w79a9ymPtf9on0z+qA=\r\n=bQSC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"59b96123cc68ac4dd67c771ef9793f7c9d334cda","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"Akord Client","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","aws-appsync":"4.1.9","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.1.0_1673460538208_0.8746902840734301","host":"s3://npm-registry-packages"}},"2.1.0-beta.0":{"name":"@akord/akord-js","version":"2.1.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.1.0-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d18391bed898aabcba54118fb4c9e080634d58e0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.1.0-beta.0.tgz","fileCount":77,"integrity":"sha512-UGK5S39mCEDEy4eVwk/XgptBvU/nyeR/TjScaVwW0sBOSKPcgV/QTQfT47dyb36jZe+yAklHwYSCOc2WUGXQpA==","signatures":[{"sig":"MEQCIE+9Ron11oq1UvlAY2dqELk1dLuQNAW0a2HNF0KkhSWpAiA10NgtsNH2qkeo3/FvpkYPB8GCER6AoWU9wu3j6Gpluw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":276549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwSZfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoigA/9FlW1QANjQd7LYIkQllf+FVyhNIlzoiHogW+Px4KsMRHjMOJN\r\nzTlKElodZHzoCySFv7jVN6OndabmvojWH8h4ayAkGYXNk06/pcRSDD0X4AQU\r\niE+a1DLqAT3xMt03qrZK1h9VP/rMKIK0/ZNlsH/Asax6C41b4k3QIOpvffF5\r\nQmrxpmBtrCP54PFPGnfdMJHn4/nOo0OosO5Ebc4giTPYs/Oga81ZtixZ7DvY\r\nnWAAHS8UI6OloD6D8tnHLqT1R8xWgKUC0WL3Qmv+EbjLKH1MF0vXGw6Ko8Ie\r\nb/hzXF//Ybc5QCkcJ2bDhXs1oeteHVTeph6iW7DoAUL/KIH3LsE/vzEgWDZF\r\nfAMhMmnjWcv1cZOAGVuv7ZOeHCjg+yhdGy9RIJkSYw5sVyuBQXOYAdtN3FbH\r\ne7rzoJTign3xJ65sbxDiBpwBJSZwB5IVtGMsQ9QaqMuIy/PLKZSYilNEPJj1\r\nXO1RNCInBr4DRWuDyJ+O1FTtMJyAmpN6mqoITMAxKSzrl8+0VmgrSHtAg+Vt\r\nUoUZGwtF5cJXK17HPzkIYjuYT5VI+mUnPErX4A29t6AzM38a8XkQi/yhOsu4\r\nE4OxtR/yr6zLJdXJizEbPwDcnGNjFbATrVnRDlnM/HvgPLWNIL2jUPITfktX\r\nsFMMBhCUEtRMqxBgSO7hIzGQQYBKiI43iTs=\r\n=HXCk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"59b96123cc68ac4dd67c771ef9793f7c9d334cda","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"Akord Client","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","graphql-request":"^5.1.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.1.0-beta.0_1673602654981_0.1219787336129432","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"@akord/akord-js","version":"2.2.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.2.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"cad411dd6dbbb1d24b72c6753e8563bb11232528","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.2.0.tgz","fileCount":77,"integrity":"sha512-8ROqXK9Vcr/Y2C4eLYskJgHtL7fSZYvg5yiBj7/Jrz3vUqvmPS0EXazM4vCBfyH7qBmF0kGy8GC9wK912g9hHg==","signatures":[{"sig":"MEYCIQDGczbrn11CKbbISvggvyjLXv3foToB4t7qONrL2VootwIhAJ4+FIkDgsLz/Tf4DONeC8sVIkip+8Rq45TgZMjnL8+/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":276542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwTJ4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmon4A/+JRY3WIoHiON9ef3LKljjXDZtz9T+6QDdAumYEEXTt7sjmQht\r\nWcQAAe0tUk267U3SGNqGd99qtSyT4M3Ep+cd34woZk1fw86siVv3OkW0xyg7\r\nmlCy8U8IJHhX+0Hzbm8cAEStX10EjCbdqLub5RLv9FDaGasDqlANiS0nHlSL\r\n+/XYraokRtSTtkiemwI7vaNScevpHWPnWjnalJKsCd+5YWTmcdFS9fmwwIKf\r\ndA18DeMx9DznDRXlCnsB0xLXOpTrWqfWVEheacR8KCNi8pSzFk4rkaEPdu2A\r\n3Yt9DZG4v5F4ruxfQTYqfQFgPyfxo1bvYv8G5GBu3sSxEAFHE8h0zrmWc386\r\nIObSVbJJDLPsOnhsXgE0Y3o1yOTuell5g0rW8ke3m70/JjxkF3cRRZSsl2cJ\r\nbCBcvBRjawKCBYREdGdTrfWev5iliZym4SXIqqolEvbQCwU+P9knxUVRhT5T\r\nFh4Sq8OtRAVhwqO3zPk+MOTjxAmtdzZcc7+mteAkbhgaeC1MPP2fUFAgY5iN\r\nptogtmcKw0BFzoaen3yoZ54Tl+p61mHUnuvgtKpvGF0CbNg14L9QVV/lHWBR\r\nnMsFS4THDAS1/sOm/HJP9lTHdIfqDKkFMtTVpdArHrbPAr/u+b4Lu1NLRuf0\r\n9I5Fz/r9Oa8Z8uCAW9nHYm4VDApeMdZMVdo=\r\n=dvqM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"22d8ee5982a6c8254673fb81c65789797d13a1c7","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"Akord Client","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","graphql-request":"^5.1.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.2.0_1673605752114_0.16854950111120148","host":"s3://npm-registry-packages"}},"2.3.0":{"name":"@akord/akord-js","version":"2.3.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.3.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1ba05d3263ee152acfc6248229c40026eeaf144b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.3.0.tgz","fileCount":77,"integrity":"sha512-2Q1rpDwGeo+I2NP+e/JuuRxMR+04XmhqS4XzI0Zhj7a+wuae0Nd6dD4gyxy3Qan7NR2BQVKbybXJjfAtJriozg==","signatures":[{"sig":"MEUCIQDNjNl2QgawmyafgLSd6VT3C/OK0m3U5fKFWKMXif8PWwIgUqWpyk76k6GJoNpyFEHz37YmfBsGNKZBQQnHUar5Jv4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":274656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxDB5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmouNhAAky2k6v+17bgaVBxhtnG6iC1GR4nL3ZXpp2J/1W1replJcGrc\r\nzxG2I1EB8Mlk+S0RHjQL8Be5BGMjK/AkdT7dNotwwx0D5H6gEY5Ne/1FHkGS\r\nOJ2z6OWlxG0s7qcbSv/fBkgBPzKJh6vOZ9AocZzvxvJvuAICbp2IYoY+3aXK\r\nY/uovCu4T/ePmhqOpBDARIR4E4HlaNmUqRxDKnMKl0HBVSzHFiljBkY5KDEO\r\n25+tzB/zS1XBFJvQfbblHM6dl5xiJ+q5rBGP9cIFAHcQsiO/zx7YtdaUQVPP\r\nmw9b4+g2YDnaVkNsPEh2OsnCHVDeBJFE93AUZUwiWvhplm/PIb7tefMUq8JI\r\nYUIIrBkBbHwPfHO/HMBfGOs5x3xlta7h4c6lcYX2XgQX4Ni//va2qzKO/BUv\r\nScVbVtu1VyHB2ccYATkvK/aIE8rNbT7rApm05z+3CNO6B/6w2htb8VySqdx9\r\n47cac+WQt6CBpQ/TiAS8dwcjQeT1BEpNXLPn8agTByyumcItqQDJcaO+e1KY\r\n8tbhDWZgJGRGKDBoQyIoX8l2pxTPOc1wSsleYuJfn438pLrbJ8ithOPxDwLu\r\n2+q7Ujw1YjqowHlvFnee2Y+YRzWS35jOg+Dgwt+S7O22AdqUYNvsJlB89otk\r\nXhCvehfPlzbXc4ETcrB4jgtiNK38YthIiik=\r\n=hWwk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"a92c1ab571bbda99628a23f053db3d27508cd4fb","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"Akord Client","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","graphql-request":"^5.1.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.3.0_1673801849396_0.18754969828822055","host":"s3://npm-registry-packages"}},"2.3.1":{"name":"@akord/akord-js","version":"2.3.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.3.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5dcad07f8b602c85ff752d11a4ecfdca0a47042b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.3.1.tgz","fileCount":77,"integrity":"sha512-eL64mNR7i1tNNOg1hRb6pICPsyFYcIOX/C0FimI7MbVppBnThWBmSOGenIqmiFsn1/7eQoaWb2+dUfyyxBlbPw==","signatures":[{"sig":"MEQCID3kJK3mA8ZjYLTMYLsbktNhB6NELM7aD9WoipIEpXA2AiBNtnAS+EFSt2bh2zOlQ+XoSD4NAWklD0vqUi2T66qKzg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":272723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxTTHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvWg//VpOiBAO8AkD5aL1neQtADNF5dhnp/RsIZxvd8PByRhtlUe1Q\r\n8WcwEBluaz9vKbyinKZ/p4a92C3+2v7vUFtz8t41VtKiXze83G57iOTkRYE1\r\niWvOGZtaOXOKj1CIAVCoXiPUOikCzIuY71tMC+pA+HdxV5mPd2n6VV0pNuI2\r\nCxVyi/wMuPnQzaH0L2mp4tLi6FFL37Yhppm5pIIz1NISRH8V6OcQ6nAF/EJ8\r\nQXnyKhp7AltuHj1tA0eR3dS2kFgIvymIiHPcORAa/Rhqc8n3KIVUDBbWXD/0\r\n59xMXwZO3KKphTxjro/UgCJgKOkDA1+nfGRlJsl3Qy1myyXxJdn9vL79kdfv\r\nAwS6HrvQUgzDprM/VIo5Ft0JZS+xieNaRXWanQ1SklMP/16RzF+Os5+eOYZt\r\nEC5ib481ZLbeRWfeBhR2X67SX7Vh2EJO0TyixEKiT9diZFDCpJY1+dWJRujZ\r\n/sZjzFCj4et3OIZftm3miuLdAL5uBRKNfEfqPra2QkUM0k+PAGwNyKjDawER\r\nPlWe8eeWQHWeZExD90EE9GK+H/xl9r7aTDRFUJzjrEFHDNfRJj0FlCFh+p19\r\ndlU2WmR7UW1BDPRrhyfHNViIxtnbbZiVr+butCCHAKMxEAvlUKTEToRcvPew\r\nvTQ1Tya0ESpGJ2Msm5ozUVsocJHokeD3/+M=\r\n=n9vb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"673c12657857f8118d082b5f010368c4a885e19f","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"Akord Client","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","graphql-request":"^5.1.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.3.1_1673868486842_0.44072125901284176","host":"s3://npm-registry-packages"}},"2.4.0":{"name":"@akord/akord-js","version":"2.4.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.4.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"430785b30750ec65f251ae8b2845600d76c32d97","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.4.0.tgz","fileCount":77,"integrity":"sha512-gusqmE4OX+nE7BALCy6iB9S/9L8vjpAtyilDiLSLEHjCQ+s3Y//JppRSrBRMgo4THJiajkGCkTckO42We+TUbg==","signatures":[{"sig":"MEQCIFYruRha/LqFNzMNiUOfquGzQ0vugCQo7kkt/0z3iNNaAiBwDmwghYStlAWa05OulRpKYLdfUpE0UlpWyGfZ0FDVag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":272723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxWsNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrPbxAAkeozelKMntis+uaXqvc1Zu6FLJ6V7LiPZjTsioWfWQxvar4I\r\niQMmrYBDYT2hvelmluZlxT8pSKLklF0vcn1DqBAYJYBsIlJSiw8vJxppCxsB\r\naTj0kgISa5svPNo/penNsosPLohS4Lin9Q+SYlm9Br1XRMtMq+FS0kFHS6WC\r\nUeFIyhmaN3gCFOHCoz4iVmLeLaC8aORIguis3ENl6wciq5RMAaVQOFiOSCIN\r\nNI0+KzqxaAjy9owiK+AV3/Meu3KCL7kxj823SKxJJlhRHp+EUR57Xmyjz+ua\r\nfEXb53ZajSYydyIfH6YnvAOV9So5/nFdp/GdtfPYUnSJsSphz71B5Gh+q55C\r\nqChCBHcgtuqfcxlNQaJ1zH8obteWUGxsjQCF3L/YcUYyopdWUUAQTaQdIPcB\r\nrI+eV7p7/0GpSa/bG7dEdkHktnlOB6MdNExhdVQ+7Gdnc++IalsY68HHdvH9\r\ntvTy51YIHLszSODTxs9/ChV0lPN8zaKIgJAhKP80ZTRzDXGDQUf14qafvZJx\r\nk8su8IqI3m1K4FgqjI35wLSsPzNCQGONLagcLM5RHLgEVYvx8f0u2n4cCypx\r\nHXboVdEOTFDlZQE/xR943aoYGBuJlBPLwkzes7LsBQUdiFIBbsONw39jAuBi\r\nhxfQuoCgjM7xjyiC2sKBYjF6uXq7oqHGQ9w=\r\n=oj2u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"f44ed140f7c4d22d43ce70b0ba1aba63bf96b0e5","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"Akord Client","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","graphql-request":"^5.1.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.4.0_1673882381631_0.6400045540739927","host":"s3://npm-registry-packages"}},"2.4.1":{"name":"@akord/akord-js","version":"2.4.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.4.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c687fca3efe180668e2c7ba5de84ef520c83a7e9","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.4.1.tgz","fileCount":77,"integrity":"sha512-6Bzy4BHlh+TjsRLJi1KWsv9qvD6bM0+doLMTeFo6m+i1Xl8RQffGDR+/rMNCwBptLZrFjR/hdUybraD5HF0LHw==","signatures":[{"sig":"MEUCIQC2WucseyuOxhEMwS3wUvNEiFSiv/ZYb+yQD3lDl9EfXwIgbq37dHU937Oe9ek6Xw+AtJtzEBBE36nGWunAcwwsuos=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":272660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjx+6pACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrl9xAAh8ng8t4ubMltMgTajLIt+h+IbcIgbj9Q/DPEgvJXLHZ/xN3R\r\nFBDdk+mOb1GfYm586pNJ6wA/2rvKX0AjdFKuML65H6Dv3YMBYdmnvhDxMBN6\r\nHYk3Oi5idfwtgrBQvuI0uVMRtwm7fM0SCrb7BAUkhaOZnONH0cVo6lJ77MQD\r\nDmhUuXEMRU7sJ54CuVmkqDopzOEJvSwfi6l+zK3CTauXv/thaUISm0Hor0P6\r\nL7RkoaQDLQJgQ963x4AnT96mmMJ0WA4778uCUoM3bcrW5yJMa6e6qb9nlbtN\r\njtf8o3ouEilKntq3GJORstuuYvW4ku8fRNNyQq0gC6qfd+lRmdUVBE+kw4QU\r\nlLsYHSASb7a+F40nKc/GCGkhghjLJTq7KBbGXl6Rd1MOUqm3G3uGOociyAor\r\nYgj+45ZfUjH3dN+Qw2uP3my5+mAI00aB9Jye4A0Qe0lbqBDBnqHpNvOqSQwH\r\nVEAYcBJnQBDgY0RiKLQvf+FI7rzAGQga9iozOFcKptFgrCMTR9Fbfu/9jPoA\r\nDL7G9+muRk613Kpss/cB2GO6bJTOPzNxwBZhs3nL30Ef/xArbTNDld2kz5/d\r\n87BEaXh9zO7n5wVtZNYb5O63W/uymfVyQLzNfGMPcjiPYtTVaU7wd2AcxPp/\r\nbeqhrcrtDr2AjOC7sOFVA3P5IssAMDApq8k=\r\n=n96H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"a41efd427eafbbbea3b61ce096f45cb4a2651737","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"Akord Client","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.1","graphql-request":"^5.1.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.4.1_1674047145620_0.9304625366459662","host":"s3://npm-registry-packages"}},"2.5.0":{"name":"@akord/akord-js","version":"2.5.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.5.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bd8a53d865962dc31c48ecee4405f49e7a194f9a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.5.0.tgz","fileCount":77,"integrity":"sha512-F0cbJfJG25qqfqi0zDGRb3lypBmBJjiXZmn5Ont/s4exffdW/osP7PDcKPO6H2qKZb/3Qjns2tbVTSwAqS7b8A==","signatures":[{"sig":"MEYCIQD9gxZMb5hbWwtEsdCpzHOBwGWxpHBv8R4KOMIewV7F3wIhAPayKOTtq1x+kH8USqThovzEQzb+3eSBY90N3DTvoWxt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":273206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjx/i5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp4hQ/+LSeYeTYb4HbFRUgB0m27eSlptoQrCuYOJiOuBrdee649hkVv\r\ndxKeQATuOxqKUnOR0dcf8a447QvjqewDvUSjjYpRUOh1QiwdrmZZwY/A4Swl\r\nrXhsA1iB6LTUvzsTFJT1fFQNsT176hr85hNTKj0O2RDaIRSLm8CshQpkYJqm\r\nIwqASpLzZ2Fj1ya7HgZuqas+zYmZThbHBkJNbNo100t9z5azMP6c7FMssoXe\r\nrBNo6v9l9sKmSvchpd9XH+Knp15i5i+UDLnzxyHpUVpO2AsURzyjbM0X67Fr\r\ntuU6jDsbawreTvF0on08X2CLM7lXRFk0FTxRK6cPEOz1fn3Wckxh1rxHsOZb\r\nP2fvggKIjGX1eNrcleiHbkedFYVL3r+qPVW2sAIotIrDHmDDbm1moYKrAvHK\r\nfok5+/u8Qn/RvWkC22M34wwEhv47y7GO3KYMxiG3SkNwtqvNHPhLp6tTaIS1\r\nloL2XhbMHhlCKlGoZ5517xxXMNvHmyMI1mvs+EksDfefQvz0NYYtZ06OTxP5\r\ntckHNz77OaXTMkGDQJ4PX1RxO/mgH7b2jp7e973Yp2a5l4eQIoj5Ys53oc9D\r\nDRoGmQvxfmNEG7gNTYpxN8ITg60A5OZcWUCpiYsq86G0r8wQ1YsHY6Mp+B+b\r\nvT9xX2TC/QaLZYLy9rKFVY16YLH8v2mN2kg=\r\n=Cj5Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"41be718a833dabf38fa30622aa7f066a8bca3dbc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"Akord Client","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.2","graphql-request":"^5.1.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.5.0_1674049721586_0.13299196199558105","host":"s3://npm-registry-packages"}},"2.5.1":{"name":"@akord/akord-js","version":"2.5.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.5.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d6ff0024fbbec0f85d68fc226447e078226cfc2c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.5.1.tgz","fileCount":77,"integrity":"sha512-oiSXIMLaJmsESkgIqlFZkRxfsVrjf/mnGSfWV5jPe7DqQ03dskMnMbju4JfNnzB66+o1xKXlAZWIz4umDUlZJw==","signatures":[{"sig":"MEQCIHD0PUnsWS5+qBKHSiLGi9aBklFFlOo9z7bpSG+lhEdUAiBKqYg4D0OoLO3w0ZoZn69k4QepW3H9L/+L9Dxkk+R8Ug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":273206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjx/z0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3pg//ffD9mp6VyKf1u2wuwp03Smylr3tk/5L3gZydLHasTCeB/xRF\r\nmpLlEKMW0IXNB2mvLoVLZwOsvur6I1gMEWnXZ0gO2BuzyWaKDoduoeomH8Nt\r\nMFgBENzDzSPvxcCEIsORsWfxK0HwpbpMVI6rFYFL8Duh37mu/AusnlvLC7cj\r\nAVS6kNDms1la352aElqGFlDtc+6hLon5LaTrVxE3FTLufzsHe2UyDDQmYE50\r\noG06Z686VelZOHkpWnDbpYvFuoWHMyRdLd/XU7rJJHAbRIfYdZSRx+gd9NQm\r\nPNy5NUqwb+oQVYmX/WB10UKBi+1dv7XwxnwfbYeTulskrpfYT7wqROCM1KJf\r\nHes5N7nVHSHsqO5sGA5nBtjT6gfadSPfwO1wEUROKmF1iiGGUScJ0kyxxU3j\r\nED0lA2ttz0p416JxI3uXmDGnQiNTy/DYg2tlfN+RSgPUgVR+D3i8L51bjZY9\r\ntYVS5p9rJvS3KNfM0B8ZzRuazbxyMz1rvEsS7nqAibNuivGfmeFMJERmAKp1\r\nYOxmXLj19azwfp+poQTaN6tJ33u0GOpgWi95BYxXU5zCqmIIRDpImOzV5AD8\r\nRpsymWT0xXnaOwYxc61fmrMZLwWER+WGsdPydBnh/c9LStVAniWU/blPl8WK\r\nxoffhCT92XpDYdhw5aRCtSQbdXFbPXDf4wQ=\r\n=ogs8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"73389156dd49d9f974c323f304b519f04306041f","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"Akord Client","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.4","graphql-request":"^5.1.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.5.1_1674050804648_0.47336922097545675","host":"s3://npm-registry-packages"}},"2.5.2":{"name":"@akord/akord-js","version":"2.5.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.5.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b0562a1cc60f223819d12e93efbce02501e7ff80","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.5.2.tgz","fileCount":77,"integrity":"sha512-/ypWnU/bl2m8G7JuBNAgU2v63+ttlpTytNQNeU2LiXu2mvhmkYh32Ol1oWLGWHG3SgkHGQTCtqaRNeok0LnfoQ==","signatures":[{"sig":"MEUCICSkaH14z6YanFEqor6LJtJ29JbJRHUoQuCpAQfJWaf0AiEAkTY1ES0KGqyf0537R23ziQOSMzOA5HTWYAjFBEjVUFc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":273309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjyUoBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1SA//VVgMK3aDBUrOF7IktVkQu4eA1R5bKz11snZNcMdAwOomykXi\r\n5JxxF4dgO5MsFNFT5cmasHt6VxApaSLuIfeh7ZL4L9oica4eztRf1xoA8fZs\r\nZml8ZikVFqnxhKa/2Yx4+anKTN1nZ3i5x7QAnItWvd9wLWyIsRhxFHkpQ0Bo\r\n5nZFIklLqbBQXBHqqhgvEv8lUzom5d+QWTxnLzbsdwScDMTrstMRQ6LFW+mN\r\nBQDVqwCzRTYm8J2PfxJNaHeRqq4VNKv9DF+Kvd4ZfY8T3eyz9EuhAxtHm/Vc\r\n9UhIyT7nHqiJvpXb+Zlm5NndFbvb2t/RKNK5tyPY8vEMFjUIFbIrIKpkXat7\r\nEcX0HMfWGOR913/XVOFy7pfLhPf4rBcRDKrg19bFgh2yKb4z0F2t7XlO+0Gu\r\nCLXlKkKGH4RlwN3PXyMy7LXamvvuK5g8XIG64jvHJ8o/OrXEevOs8PVkqXdT\r\nQ8ywj3cBYmW8KEvSp2gkxj3tn3j56sbkldFwOitA2ht8F4SHEFkdgwYAtfyT\r\nO5rwv4+/PY0E+2BJeMWhrQO6v25MRdZDloF7QPONcKN6ftcf5Prz27X3xDpV\r\ncZ+0h+zIxpeoGTr+J8xt+bLWiiHLWSp2C146u671SF4zhK//+/NsNoCjAwgX\r\n7rVhCGAcwr/fMDF7Lubh3gdTXn96ld0zLmA=\r\n=If/8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"87dd68f17908f5f4321d0a7fc618906b68fdc15d","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","graphql-request":"^5.1.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.5.2_1674136065441_0.9365422282685603","host":"s3://npm-registry-packages"}},"2.5.2-beta.0":{"name":"@akord/akord-js","version":"2.5.2-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.5.2-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9434f4d6be45921b3dac54c1a0d8778156ef2b49","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.5.2-beta.0.tgz","fileCount":77,"integrity":"sha512-ETfkzDAiDwMBHWLSreFhNVMyhtMiKfhqtntD98Tx8H6u6mKLJVWJ/hSbItfdaMiO+aqkPrQ1krZlcbJ8I3Kjrw==","signatures":[{"sig":"MEUCICj/9ZE4jM077wu8qExvsDW0ypVrKsAlc6Db/t2q8JlfAiEAtzN/GJAGOVQB+yvnApNOZeK0Gav1xrLpjQwegEIsO5I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":273093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjzlBmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvWBAAhFCyCTwmtxsoCTWs8rjvEL5T2nLU0OAGVhlVGeBS7AoJBBmt\r\nqn02D/eeTVksFrKAr6ci8uB/r9zEuSam+QDPfTTg5UretDmgGFwUe5YMivf4\r\nEwHEpC87AbJab/tp+WNztAdm1ikyt1Vco3I6zY88BJ7gCyE803iw8uBFwFGV\r\nysc8wDCe/UZGDAG6ttMGwACVIHM/M5ri7f//aOKK0K9QWeGpXksK7wpFNSb8\r\nRPM4Io0EikbHGISMLDmn8iVW4Ojh75xQGn76olTIABC4H5fc8uUl4A85Dj6l\r\n7gaaJMzQwn6/zpXYwrC8g8fmwjrVKTDJHeKMQm5yUl6sPA6KliFe8O2UiJio\r\nnuN4HC8YRSStm5MScw5KmBVfUgC73SMFQ6Qz3BgkI6lcm1ZAnX2fDd87j2UL\r\nWUCNAiKvFVBZCcxa7+gmByoA/VW72MFq7tac95Kd9JikD3H6e9bMrOPWJP2M\r\nA81ZKPoJM67FT2aaVB86W6cVAhadkgz9yguFr0/kHrIYz0f2uR2HWg1QBhgQ\r\n/hSOv2lIpEv+OvBP9WjFY/gOSQwURbMwnHQMgiQl53eSnm6Hh9GGZbsSHaZb\r\nKITf79nrA5+aZkJRfE4yDVBEN7onZNwIaSOi8cgQHISvBJJym6hgwWBdYwsz\r\nx+2ZM4l4j2KrE4fZtXInm+cy9tq/sjxywbA=\r\n=DeAc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, name, content, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`any`, required) - JSON note content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"Hello World note\", \"# Hello World\");\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `name` (`string`, required) - note name\n- `content` (`string`, required) - JSON note content\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"Hello World note bis\", \"# Hello World bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, objectType: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"d0f3e02c416c53a97810281ac516c7571743796a","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","graphql-request":"^5.1.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.5.2-beta.0_1674465382403_0.8898803600916052","host":"s3://npm-registry-packages"}},"2.5.3":{"name":"@akord/akord-js","version":"2.5.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.5.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4cfe85d94c4a2e770b74309ca21cc74db2223c5c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.5.3.tgz","fileCount":77,"integrity":"sha512-N80LDUYIOKuwJc5byz0nrd65AZNbVu9TaYpZ3GgHtslPuZQjmiwYI2dUCWAezByP0CP4RQWUN2hEXd4FNm10CQ==","signatures":[{"sig":"MEYCIQDgguJNQDteJODmwtfGngh+mBsA90wqXNrQ71toSZRZNwIhAOfV0VqQGiahlxAbnuJVhGWOoALEW+z+T2wpFC4vSfQb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":273086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjzlvAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmog+w//SicykosgNKDVjYh8Yyxsg4DOogwmIV4nkWiZy7LurHQ19W6o\r\nBv+qU3D8BDdaibRXxYqiyraPqLbOY+DGaclrjNRUkxybmRyzvsqbxMqMbXt6\r\ndle5CXRf6U8v/Jb4rG7j6saVEvMHKo7TRAreLk/u5QYVpnzPci6YWNtLelHi\r\nAC+DT96t7vnEmWUf86OHLUDOygpmfXrMdWNrePO1c0KOMvTXVmUP2JHg0FNh\r\nXy4xir3HuBvb6Z1xE8Kd16UVk7Jn15/+PXorHY/MBxJYILJRCTaZDiQh5w3/\r\n3kkQyGgxGHlZBP5W9v/wa/u1ZksnQyZnzVAmNkuTsqjZUme2YeFx4vHLI7fW\r\nDAh3/YD8M+cL4f+75fWpAyEh5QS5PJjEu6Mvfh6cERQ123s58XHVYxwyGKGB\r\n8nV5z6mN2mb0dko+onphzraOjnn256C7p0O9MPIf243kkx1ll41JIZOCRuMI\r\nzbFrmySHwW5NV4Iy1/NPlJveyA77v9MbgI/OJD7k0ymJcca7QR1MhoSF5woy\r\nzA0ZvJZm6ZHXdaHK9DiM2JoD7tg+u3iiJpDn8wVLak8NF9jr/ZVI0oqFC/N4\r\nCqwGNZ8XRfXTneCKEeeKoNX8/7ufuKeXV1Rpmc02qc9Lc1rdWg6wD9mjec5B\r\nccucJVFxcZlDkxZn9kkxEm/xzn7oDkKAUts=\r\n=t/ca\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"dcdd4d5dda95da352589405cbf30f4978cb96876","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","graphql":"^15.7.0","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","graphql-tag":"^2.12.6","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","graphql-request":"^5.1.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.5.3_1674468288530_0.9332775809715539","host":"s3://npm-registry-packages"}},"2.6.0":{"name":"@akord/akord-js","version":"2.6.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.6.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3a7ea4fe51203e649f61d972ba47e818cbc54e18","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.6.0.tgz","fileCount":75,"integrity":"sha512-BboKqg/E0fZFUkBLxc6TNxw1fVDOGv7j8vOT+Wzp+cvm09rl1xlR7V5xfW7uDYKdiu7tbZH6doKVaz5wOSB3+w==","signatures":[{"sig":"MEQCIHb2Q2sczPEyP4J3XazbUNQhW/HAFY5ncFbw+x3qBpFTAiBFqSdOAVl+ygflg626FmYUyzCfFaMLWbVxNemG0I4JZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjz72gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqEXg/9HlCy1bVW97vZ+OL0mmNC3+SmfjbONZj+IMv+q8mYDzKk2XzT\r\nuYVUSHeew7H8aIJjqSB5ofdQLbVEZqE5Byo3zTuohmA4k1bk6exadHgk1O0Y\r\nDs1Mv8cXXHMqJW61ALhP5c0LhwQacNN/mitNIzBwBz2Kt0xSTdspCy/O3lcb\r\nH0h2T6fFJD6iqcFQDjxKpNQStVpJteCYuLYFqzInC6P990COqEJXCbGY8cl+\r\nR4TbtICUfkwKc3gNicOV1wsbHrN/Fk6nLBHQgdQ29Dd2vVVo9ITylhGAtV5H\r\nLNrBXgNv8p0kYe9FpK4M1trW0aP2HvRA+X2dmDVNpElC5xD6MeiXgfL53ClJ\r\nvIE8FI7TqbpveTBZTOcuF4Hz6KKDNwHGOL1GNYdsntul5LvR/4dWBkL4xNNy\r\ngfl/WnorJJWF6xTpR0cTNA9Vcm4/mGYqoY7rMNqwAxo3DXEEXbmKshtZyrX0\r\nwXDKA0NvrKRIEoLgaOULloAAOVriXhw0smZIArWNjoxX+Iz6KfYGTQB3pGFS\r\n5zv4oMKUA1JzHWoKKimF3sC7KulM4wdfjnrFa87j+FVchRhw0KfTLpvelvE/\r\nLyjGE7hT2A4l7A4cbV51w523ESLQuqS/77o8kng68sPtJvCsxO+NamiWU9ie\r\nhp91EznKJXVbHeUJ1wxBrqJn+Eo1cNbaRPs=\r\n=IiOh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"eaec91bf90b40c80e3b173dabccf059928a228b0","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.6.0_1674558880731_0.5507132805220625","host":"s3://npm-registry-packages"}},"2.7.0":{"name":"@akord/akord-js","version":"2.7.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.7.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9ca5e0b5cafb2355b09efb40e159187a2d82194a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.7.0.tgz","fileCount":75,"integrity":"sha512-bd6Y4CXiTP9jmJ5mx10cg7KOgdBaNFpR4tRHtLuGx56zDgrFCaqro1POneO6ey3bMnWLx+1oo/ayuPO5/8RGEw==","signatures":[{"sig":"MEUCIQDMEF1tgP7yVibHat+siQgc+aj/6qQ3e31jQfszoZw04wIgHd9Jep93a01JGq+kYq/EXZ+6Di50M3Xt9XJntJNlQVk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjz9NFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoD5A/5AAm35ssQxaYDrLbCBpa7F347VnMvht4UZDxpq6+59g9FVlo4\r\nDyAtzQC3Zs1BH6HxjhCIj3H8OVvJpVMySaTdXB8/5WdSZcBPBnMGbuToLVpW\r\nrwrmIUNtVejR1caa3y/6qtbo+wDswFOX4+da9oiq02G/vtjikuGIh73jY7nj\r\n048xaP748WNHcl/5bWn6I6MysCob08T1vbmN0bbqZCZgIE9O+8aI4/DAlMVj\r\nSANoVIV9DO9rKRwhaszyRDD62mI/XALDmNbFDGByJcxxDvarSLFHQKM1627B\r\n70B6SYhZbAhOYIh1ASYsilcBFjH0ZAY/CD5fx3EWGjeVUA0X+9doW3OFy0UI\r\nquYW08UepvIcH/tA8mdV1ghB8C06TdsZz5sgbMARmSwNgfG4PVNA5ZeLfIfz\r\nyCMvCqcLW2lI8zcTJjmnOMilAkL2bcu0UsKcxLdY9p4mbsF3rDC4EXQJk1DC\r\nAwalWLeRSRbk2NcG0s9CMQqpMIh3alHaRykULrB0U2BPbBlvIebEb1w5GXKB\r\nR+1H9KbGoCJFUhBxI0ORbKsbA3m15l/xh/TuVr4gJAU7LjsfnTjn+4RxCn2C\r\n0jEcnAvdotX3hCcxXmsJpByf2ZnDUOY+LsC4j4XGKzYzdifwLs8ovDkQoNPe\r\njMsmeyBuOPw7PRs49mZQDDratlIzo9RwWjg=\r\n=62gu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"2be42269a5c6d47faafa96a38f918e19f9985d29","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.7.0_1674564421557_0.9675811211672123","host":"s3://npm-registry-packages"}},"2.8.0":{"name":"@akord/akord-js","version":"2.8.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.8.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"00a1d724eaca7cfca0c7e40e29c97ee0fdf09280","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.8.0.tgz","fileCount":75,"integrity":"sha512-6reCIzzQbIy1uSLKWlRrCWVZiFeb3+D5Sjxkbm90bP8lbeyMWkY9zXFUOeqhpRXr8oI80ePF7YIBnGrvHsmIVw==","signatures":[{"sig":"MEYCIQCWm9h4VGykvY/Yg8d9stye6WWdkVGAid4UuvUBIsQkxgIhAJeeIxVF6TJrWRBdDoDmJEb/BSuEa5Sx0CLI34Cj8k9V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjz+U4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGBw/+MANO83RyumsZexcmLsKoj4bZNHfQRFdShZb+vhPF/8uYA8E3\r\n7Mv32K9g+2UgEucUhBzg+BFr1wygHQpt//I1i8GtIH192U3y2RcVA2qK+sF+\r\nmrmdZmDSWqm6fF1tgwf9pjkTu96SI3Lo12uG0Lld53cp2vHphUw+ZMtjzzuk\r\nsPpZ69VmyVBbYLzJIIxXMMtLs+Rjb/8rRLfkuCY/skNKpV7MsFce68SPDNPV\r\ntLqkOXTLqGJr4eZfgrzWGoXT1yr6XKxWgh9bDpZjimEqhP4pkcgPGZY9+kU+\r\nOojG83fohNwF6YmNJZRiOMAwqr7oQfO99rQOfF5GrGkTFi99FXyB+Ejw1pLi\r\n+Ap6I8JNFMUqIhI5ULj58BCRmK9+e3SjRitJ6iRONmwBrNJTtEyb893MZGlB\r\nCrv1fxIgopZTnfOWvOppnBoEgCpgmySZr71IDYMC1Dr8AoTWFANS+dzeChMj\r\nL8vENM14L+fqoenrkXW3RnXTmL0uRxl8CXLCjxQ/CmTR6p6UO2YTFarz3pgL\r\nKOI0owHaUQmAdQZ6Q+uSiqVA2rQ8wTew7mi3kFo80jrxg9PQQBld7KuxgfKt\r\nruhoviyxlBefY7EsfrSBA1vWUyh70LM5KOUhHCSkfI0d+tMrOu+/nnyY9T5C\r\nVHSVOUxeSyHGq7R+KjdpCFhark0BN/cha+k=\r\n=ixvc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"8ecf868fc0d63ff6c79675f875388de84863c7c6","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.8.0_1674569016646_0.4442663150995694","host":"s3://npm-registry-packages"}},"2.9.0":{"name":"@akord/akord-js","version":"2.9.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.9.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a69e21994c5535319912fb879b1dc19961286ba0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.9.0.tgz","fileCount":77,"integrity":"sha512-nljEh8F069Gu8lID8eYpoXaNKSgQ1nInePLLL3TnEJNKfLbV3ECdVvnxMq7VA7fP7NCTvxe03DXVIi5XOhwyYw==","signatures":[{"sig":"MEUCIBXBKI85OfWChxDT2Bvja+atx7wDoW82JlUYxpDzJnOfAiEAx6u8gGpwutAWaZxuTtyiay8zBGk13fhoaifwdU3zakQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243499,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0AW9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8KA//Y/er4303Np9VuH4hMdkTR21wXyVLn8DhHocF8ygApNtEgawv\r\nOuisIBxyF1T5T2czNDoRpD/jF/dfP8fZEkNzz4mlcGZYxzU6gqPaFVuA7c7s\r\nEH80f9bCEvwnJcUjIrU4qntFbOPWvDtmRagpI5eNLg54I5Ofb501kMwPXLcX\r\n/sVntGtm/QCws7xAg9tmx8JQ3biv610XG8jnlbh78SagQnup69IdLfHFVl2N\r\nb982aKBJKyyp/4a5Eu+POLPH3S3UyMcFJ0IX+up96mxKlMnMtHx1nbQQKV3s\r\nTLZZ/li1AJhnJezS5Qw7biF6Dea32SptuAsQWPQNOQq+yELrJtFNgJPGAESy\r\nn9hb5gKGxl0nZ0NLIyiiUdk+x+MBFLOdyDpmMusAwWDRYkfQSfFeFjS4k7vT\r\nU2fguYuZxNxo+36EOnWTMDa2V/XpG/2f6Dj2+OqGCRz0HVfsX6ZhmjgoTeUm\r\nHqb/jpk5AsvSP9gGVmejyw7SLTRDBcqhl1Jmor+UVioJTRv0oB5DFcoidMWO\r\nO2Lp9dxDN/fvBIeExEyW7F361+4EeFOS3Y3hBaSMi+SfVEg0ItWV4c1nTaUD\r\ng+WstN9H0SFRJKdmNEp8zgnwLGJ9r26v9/nOzUHVrc9NSDL1oMijKKQwjq9F\r\npBL51M3i5QbrgmSM06lulPqHkY1/QDyxgXI=\r\n=NLx5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"84ba84dff01880baba7cdad19e6d130f7efef5c2","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.9.0_1674577341467_0.21822888501974136","host":"s3://npm-registry-packages"}},"2.9.1":{"name":"@akord/akord-js","version":"2.9.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.9.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a752536af454175ebac79fe6b02d35bae98733ff","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.9.1.tgz","fileCount":77,"integrity":"sha512-aqQ7cqWxDTwI8dguu3pdBvAp33a2Lv3XshlTmnfcs+/xFdF9v8DV+s70p+d39Vjb2gd4GECJtCdP+uw8zoJoUg==","signatures":[{"sig":"MEYCIQCng+g6g53423vxMrLpKNiDMPGS87BkmlFqfWg0GTnlSwIhAKSG/wi4ITSB22M3tiiHCW7V9OPbzzAVXMsqkgKmGAXh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243499,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj09A2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7fQ/+OK6QsCRhMMRs+swpzOiealZTO5/ojkgi7e0jh8/3aE9t0oyu\r\ndSpqrvl/1O2ZTiFQneSjkiFOHwlDRy3l0DVcyHHUQrIEFODiMFDbNDhD4D/Q\r\nLbi7DF1ogVFUxOL3RHmcrFfq9ldhNnBdvUhbzlCM3Papoo0eymj5eoyvznWr\r\n7waz0zsk+aXKUTuSUYQU3TkuSE7/XkIPyiRUqwuLx/mz4lB1Zm4elP8l0s51\r\nxn670OTn8cvGwCz+/RPGQrpIMizyTlam/UVBNQBNQsPQrq0KcFb21YR563so\r\njsIJXt15wjCvpe/a8irnyFSSqTW8pGqz/bdM2TFfBgIMEr1HG2vkmeWuDPHU\r\nT7Qm4qP3ENaoOCKdKALpGjAxR7n9g/3WbexBN8+uCqrpTGiBfn98kBc4JxZj\r\nqSyoOiMrd0G9Zexl7HF6HXUsaRUe+JPLsh+ZkfshRjVbTxRy1DyY++KQsSEx\r\nDs6iWDvPOkRfFN9rToUj6/JJXcEcsntYd3gH8df265VtfckHNT5NSZv+/PyS\r\n06LCaUXR89+l4muI58xXXgL7zlDC/nmVWnTsjFZIl4BHhR4mugFq3MlfNGvC\r\nLkuTZ0XmARCGKRYU3FzuyOVNVd2VvKDFSgA6m2gf7OnJedzQHhnpIdfFh+ZX\r\nhkDm5rlYkNn1jlpyIk160qcQ2d679wWANbs=\r\n=hJyQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"ecdb11d53c5856950e1f5fe4883b1513e8ba6136","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.9.1_1674825781804_0.5760059613941886","host":"s3://npm-registry-packages"}},"2.9.2":{"name":"@akord/akord-js","version":"2.9.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.9.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"872db62b83071c3f6c1d0158d0740289526aaa15","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.9.2.tgz","fileCount":77,"integrity":"sha512-VQ0f13qfQWl5u+klW+HzqZw7R7c6D+9G0BY+yKV7Zh1x7vu4gt/2kX5TigvqJx9LkhU3fOTehJxyfltbZdLbQw==","signatures":[{"sig":"MEUCIFTgs/qUE0p0BFnxpFRXaJY8NwBTQyvb+zqE1HfeRK5gAiEAj557vw8bOM8rD7BRHLwiPXZjNFAo7aQDRXsyCOsG/Go=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2Q9TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmLA/9HCLcuhTOaB8V6x2SVbzGnDB8lYArppRTPHpcKCiQ/Wt9RnE0\r\njcFjRvsiUpUfNs2LszK2GdeJYUoYuZB0ytAaD3RR3lPrWeObslzSPMgmtPmA\r\niW3UImy0QnSSeaSQF2obGRUe0b5ljKc05qm1wXC47oGaNkxl9YbbvuF5ge16\r\n6XIFeqyxAA2PRR/BUORzE8IyLcKYCHD7stXhqHhuYkouU2ovOQ98EWEtFJpP\r\nKPNpnycmYRnIe00OZqexDC3On5+LIb2uUOC0P6qkXucscTXniwT0+lXJD4iX\r\np/DgcOZCCYe/2J8lODZ3fdjc4qi4A1QgZ/Ihgp9GX54XNlzlED2mG4o7QIqP\r\n+B8SseQrJhXMifjwckuiauWcLCM0TGOJu1RmJzgB5zFbS36BqvmFYAoIe0W+\r\nDgB6YLrkm/9fwrM1B08wwvFc3tMRcwmD/UyWSB9H7KLIdKy2nOTsG8xImnQx\r\nC8tX78lcOyyDu2bgnOgvnzpMK9kyfFP5qD3tXIrYTISamBDmVOMvjJgESk/S\r\njibclE8r98RYTN9sPD7EMz2FRpWuBBpWhwgJYWL9JvSbHHnhnGBTBg/alQoW\r\n8E5HN5ZRkHyZ3o/loxzT1Sp1B1v9L071SUYoE7456OD9kWUgBXnpon0RLuLn\r\nKs9agPJJ4EQGtMAej8OcU42PZMd0Lp2DVG4=\r\n=rkdM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"3a3cfbcb1d30fbb77161af5e4d60da44e4432e04","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.9.2_1675169619238_0.9152316973565333","host":"s3://npm-registry-packages"}},"2.9.3":{"name":"@akord/akord-js","version":"2.9.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.9.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a26ae3c9c30dd81361b308b75bd63d71dba5580a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.9.3.tgz","fileCount":77,"integrity":"sha512-SRBfN0Y0qO2cwZtTrXiwmSPW6L899/eBxPl3MCqwqx0x1yy2ElqQesKoArR+xHvWrETya6YqmEq7QijI3axNeg==","signatures":[{"sig":"MEQCIBHPK1v01OWJRacr5tY7bGgSSWXOLVtdxkLBuTcUzYqeAiBZMVs7g/tDD6O6cGDnFgsl/FFWM2CVruYRxAes2Ab+JQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2UE9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrK7RAAitazvOGu2nofvs8HMun8LwkNf4eGw3adtImjQ02M4H51/8Sj\r\nZLcvOGz4p+6bA/Wdu6TCtzEZ9agSPEQ7A7/wmsD9LvljReMy7Kueq7ypziwm\r\nRw9SOIUXlD8yMKRszznqXyD7cJU9rds8/v40xhyTUuacLIgVpP92PNfkcNjL\r\nyT7T8AS8MFU2W7pBkf511eaMpL08YJuNu0C7BZY/mFoyuTYc0gPlMS80wyfe\r\nc0ax65zQcswOa8bAm/gp0vX9cnxeeBVPW/ccnMNovnsB9GCQsAfwQgr2kWnx\r\nUL8O4y/3E7CFwo47NvKkZst4keZfqmScKt/7V3aHDqObpt1nO/wihkSuixxg\r\nAHpLxGJXk4zAQZIm4rB4GkKLne8uog5RunihL9Ia+i+/RHG//pCAs3acjRq/\r\nsfeL84C9KlkBzWxYlZpik638RlRgQX1/lF7QzzaETJ+Bi8lqIIhZbfGFaUMJ\r\nTxqvkWCC0W9RC5QFxTCUnCSrBkQ1O51piXT2T3g523mKnssV1SCppLRU3IeP\r\n99LsKLst6dnydJc3nIRpElpu7A+6aOK+/JeWeGnPrVIX1jRi6dU9K3E+uIbp\r\nlZJyT/CvE1rf3VHJMYmhaxFkLphY0dLv0YTXwA9mPBBM+fcpdFO9RBm/l2F9\r\nnaYp9W7d2zqX0+IntSqEYF+O5UgPmbA+Mus=\r\n=wA1F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"58a57fd0137f90e8684c9b01d68e0d7328c71dde","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.9.3_1675182396882_0.2806695865692328","host":"s3://npm-registry-packages"}},"2.10.0":{"name":"@akord/akord-js","version":"2.10.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.10.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4d462defd45ab19e567b7b8f0f94b80ffd8e3368","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.10.0.tgz","fileCount":77,"integrity":"sha512-cG5ULay+ojJ450FG4VhHhj1ThtVqNb+WqalVqg9cPxx3bTKi5u+q6jshe9dhzkKyegUqBXTS9cFyhLsAxIypGg==","signatures":[{"sig":"MEUCICakgkVuSKNAEO2324O4sHpCF2UIRNuRNaCRYmK9FI7WAiEAqwaAEjl0MDCMgnYbiNx5tKu65FnCsGnlng0LFNXu5Do=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243481,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2kfCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJew/8D6P37eq7xhPp9ZwMCAth3HJJG1hBFNj6i7drJsGmP41Oidpz\r\ntzRjx9LTd0R7vUButE2eg66f4WdGgFC4V9SzVT35/twqTHU/ycph9UlDc9Uv\r\nw4eDN7yNp1vziVYLatghy0TCcxv8sIetsvMuBd2z8XMS3a0JKg//ZyUroiLO\r\nBqaTGP7w4cVardo+YVKUv/zLt3BWn+gw3026x1LDW0uymleuG1i4VjCuCIvU\r\nV0PL4G6HXA3vavuewQH2J6+3+vxnLpKa/OoK8pgRElh4sYYFWU6BvcfCvirw\r\n/BR/j2JUmZe6WFepNCaoEL0PkBm5VNj7xPHdPJekgW7iBe+GIGJQEpoqMFsn\r\nvhxy4czF+MjQIgGhHYWnY1Gqbl+oLunEUT0SQA5a4thpouJA7wf+5kh2N6+T\r\nfu7u1x5n3bQ7+zoZRjFQl7SougEk+3ILTu0raOy/4k9p0Yi1Q1B8dF9kM3qj\r\n/GXOQCA8q5IlpjOZo4pKIIP7xIkwHJzLcpG9dnR+QxbicVQACBVczzMAXswf\r\nVxbrLgjSsI43q24PNMYL0+arhrHUzEzb9PFG0BKAqrkk5CrbD6rdKQ5Orz0R\r\nhfRWACERC4sB8mgizOjFbUr6J48tyHSTA3HTdVK7fo2Isn2ZWYDnTYhUZjEC\r\n3fHbr6rtN4YXpefpz9yF3adYfxf5Hfn20sM=\r\n=CP2x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"9c2d0e7be97555de9fa948021103e4e5a9857a06","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.10.0_1675249602497_0.6126216242456053","host":"s3://npm-registry-packages"}},"2.11.0":{"name":"@akord/akord-js","version":"2.11.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.11.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"addf11637145a6dd037e7b0313990523f83072f5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.11.0.tgz","fileCount":77,"integrity":"sha512-kpyFpHBwmVVs2BHCeNRpsr47Zl7s/aEveH2IyMX/7iig5SU4epoykeKlKYrLMVGRUEb7gtkjGmFhhkjwrdrbgg==","signatures":[{"sig":"MEUCIEel3BcO1rTqYfCTNILiUcllwLHvqkzw5NNKxQl7mrQbAiEA0sORUVZ6MxjCzZOubIuqhGZuC/YOtqHJQCroJBiL11M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2nekACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr44w/+JAUDELyrql6zKzUN+OYKi4P2XWZeDsKJAi+26uuNvAy+dO36\r\nSD1KktrSojYtHJKPTXIUhtJFxhdrVt0dcAlFdXZ0qzROtTsDow/P8mo1jWBp\r\nkgg5wepgwNx9e3VaS7FUra5BHbIbDP2L4pDv3ELXDEl93rY9zToxk/wR0FEP\r\n6bBRSPa5Bfb9uH0msObymCzsjOtTGMa7Dr4VDlm6IZmG8Yy/qT0UNGIbvfyr\r\n6xuxrLBEK6a+EUcUJICI+vJyCRygMpzxK45z0F7Qrr1r7S+Y4h3h1ij7NpUk\r\ng4laVVDFq/RhRtkQVgsAmCrKun+zgL8x8DJsubPa7H1nYEKdprygJDVjNiHx\r\nbwR/vcu1bknsDKeS2Of70E/4h6tBNtjAi1PvGs9YpSBynztNknU33zxGD1bQ\r\nPlPMo6lXHEopB9MAC3jDmpyer7uJt77DG8mO93l7QYdDon0GiGBDedOhqUrr\r\nkNHhKYZr6Ha7L5Eb61nWtU9InzYw3KIGvHsQJzbDybQfyAyvZdlPjXqbMKeP\r\nm+Q1tEGIwoINB4Gl179+1wuIMbZyL/ybx9sgsN+NwKKDzSEFBajyRvLXtDQ/\r\n5UP9DN/EEAb2PATydT9QJ/BdfWB+FSkZ18jAhYxaJXkOgcEFTMYlBFJxdMh2\r\nETprhi4JtGA/HnDzz+7i68NefuBXl4KZ2wE=\r\n=2p+e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"70bb042ca8b241a191c8c3120c784d7b85384235","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.11.0_1675261860261_0.7478064048529556","host":"s3://npm-registry-packages"}},"2.12.0":{"name":"@akord/akord-js","version":"2.12.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.12.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"66a201308a95b462b95acb8bbfebcbc360aad908","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.12.0.tgz","fileCount":79,"integrity":"sha512-HQtD22KtL4SPmuzQK3iV+hHFulk8GCPvBDcmoJToqzm40SpedEu21yJmXuNUqUbyFU2VH61VkjDwCUYQ5t4bCg==","signatures":[{"sig":"MEUCIQCKhI09c3cBt3/BZExQOVJo6H0mtnuMO2QLHxpxqtXZuQIgVOazzBpoqdNObUJMWeo7/Mh/VJ/sRkT2gZN1naEiHXs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3PJFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7RQ//SzvZism0lXyg9r34SyiViP2aI9Ri6EUqjFovss1KoMoj9V+R\r\nhrXnEDtrEuIolYJhUOtzTzjJmlfUHQ4Fd3TAVoR2eLwudEh+GitdcW2pS6EI\r\nhHE1wHjUmb/c8KVmbcMc1v/cBPUt4U9YzQRCjkDP/1KBS/OJQd/SIHMlOzjc\r\nJMeuqhROlZHeigGIhMHNvbEumdxKmVfCvt9ivIUm/cbEH7Fd/nOjzmD1r2Mq\r\nPhI2t6AV2D7g3xaP9ssZYAkpWTVY0W6P6AoX7PqKZhr90zlcge2BclCHeSYm\r\nrSwJlE+2TTa4W+/OtAwZfI2OYg3nxR0tJ7eyrD3ZsZJ8aIkwIhWDrrnltZXl\r\ncft3Kdr2SYGGkIogPkpw1CuPloMmjaZ5/dXAnr6ECvKya/OC6Txma0iwZfwi\r\n4xGUMXTZk87VknfxR6Ijb8C6bJDDDgTjbcYX5ncpfkJOLXLFp5Q2jRHbF1No\r\nD4C2smI5qVeGfF+UGck4NCDtLonaLNZkhFkYA0QfKE18s2NjebxiHtGp60V2\r\ndRbeaWVbMqJob7qIR61Z6fiO+43PIGzkGb7wKU6dD64bzRD1SVQI3DXg6EHF\r\noLQTMHh0Ik993o8dNcZ52sm8IwHdjxvCwuMxn+13KS8GZMwJB20Q2oJGZyeZ\r\nCh59Eu91DftmU97rTxgju95rDKvUFWO47jc=\r\n=Fb4o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"5ddfe9308398687ff9b252f4b002a937b0ffc941","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.12.0_1675424325224_0.0017336212163039377","host":"s3://npm-registry-packages"}},"2.14.2":{"name":"@akord/akord-js","version":"2.14.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.14.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4e679f277a02255b9435a7be390ca51c0ad0ae22","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.14.2.tgz","fileCount":81,"integrity":"sha512-KIn1DWnvD+sqJqNlhDtlrlrk79GKhPzPL2Y23MQS0q85V4JJXj1E+U9GjW7Nm1xCr6k2/doO7UHh0EwsfuV2JA==","signatures":[{"sig":"MEYCIQDFmycFgJQU0B6jMfP46kD6i/5lpdL51IbSDHV6GHWdVAIhALQ9jQPJ20vNyOFNu+U3Lz0aNge+E0ScuZRaWGn7wZyv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":249859,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj41pdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpOqQ//U6nllsn5G/IoOpzdtJIPXy3+GiHVpAuD69TcyRZZ8HgJDPUg\r\np5vV6K2Ju6MGzwub56RdS2NpKrJKiU+gdIEdsFdjO5oRQByohznOE3wuVQYf\r\nK4i2n+1jmFIuYKpoHUSnfgu/VnsulVHa+DtJaIAIGPjbEWTUvQ5+rmuHA23f\r\nvOK94RAXqGOO0OyLrVolAWK1jMVAXwPo/va+5rzNQwQjTAs9HYUDXCSUvIaz\r\nChXrFNVMzpMajziLk0j5nqoU6JNig6ZOIK5/P45aNXT2MtiHlYA51iM+3JgP\r\no3/rOnf6RIkGbMruGdMzNU/Ct5Mgt+CS/zsYaWxso7HXsCRk1NfLKXSogxap\r\nizt/oPeqmWDgXppuhHmRSFaCjNNRSqB8fP2gXo5p83exQOChz3sR9DR3pc+g\r\nXM2q50gTLKEk3VFfr/EUg+dsGi2+uvvv0/rsI9a74SDtkyeNFgdYHw6FJ2HR\r\n4h1al8QfhLDQlIhO1bRQj0jfeVdz7JbofeVka27bRJ5JdsubISGBWJq8c50D\r\nXFz8qMJASHRS8Z7XfSCsN5LyQTtgkZ/1NDxLcXgmRbnno/m9Sut1AVQvmKRZ\r\nBdAP+0PM0rFrusAIkut5f1gL335w/04/JH2Br6XpnX8d7MJqIUwbDISM7hcp\r\nhMisxUy2sS5RY5xL/Ma/sIuA+ZmUtgzO1gE=\r\n=WAF+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"f4663d306e239e7688657d38aa799bef486792f1","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.14.2_1675844189639_0.7787846740127173","host":"s3://npm-registry-packages"}},"2.15.0":{"name":"@akord/akord-js","version":"2.15.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@2.15.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"34d5a8c4b6964b0b32a9b5045aa82b5ea7b28301","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-2.15.0.tgz","fileCount":81,"integrity":"sha512-w7gRAcSZo6nTL7FIYHdi/5W5MGz4HUerf/eOnqoLg8H/s4jlNy1T73FvuF60YFBcixwKBEfkqecrrP7S0SJsbg==","signatures":[{"sig":"MEYCIQDch/cJo06RedAnw1J7/WD/FEFFDQ4IFJtZrhujAEeFPwIhALztjyHvirK13CMs2LYkEzHiEkfgpdyIIq8prB/giiH1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":250541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj47QHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWgA//ZlcBGDdZfAXydIFLIYKK7LsnE2pv1vriz8bC3BiYT2AYDIvL\r\nHKJg5tWlDzbXWhvC9OHdZ64o4znZQG7iuNb9Kf00OjalDc8JpsAS2WsW4zzK\r\n10qnmc+qZbG1PUFIQiSywc2t5UeANnmV7EaRIWQFyC6aDkleppjJt5SdkbEG\r\n0GSctCGGoBJW9VExOLDtggnQWN5P99tk20Bq3nKRoYLaMi7M5IbuKzr44Bpj\r\n4odtUzk9Qnpn6cpXl0+PGzVOMnrcZLvq+OqfhxyhJkqEgfqVOhvwpVC60bNQ\r\nM9hAaYaB1weqX20KmkIXMjcA5twKdGCb9pF8jbFAQM82JK8vwvxuliqyRGjl\r\nzgLXDBwxDMqiPpoTvP6LB5HY9ByxIEzMRMmhwllxRgmP/DfhSPgo3K2spxPg\r\nOoSWRNunsWFgz76badN4wAjU4I+d8CGSsAeSSKAu3FXBg3PJn4RKfriCTNHq\r\noUr9RJbOJbnfuZL0anmFkUS5A55s4BQmKXXCUn+2RAOhAxiM5K7MoA3mxPlh\r\nXv7hPFd2WWI7LljKeZJkoqMledu8L9ts7Ja0KDLuE0i9py+FNSUG+DK3autx\r\nrU2R0Eap6mpmIoXfeEPmPNUAvKV+uaYHbHuPpLCPF/TrcfboIWn9U3hCo4jz\r\ncVuWSuVodYHRGsSKvyH71ZMXzfAj67wijGc=\r\n=FrQp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"c6ba8a35e25b681826bbad3027660debe6968d12","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_2.15.0_1675867143052_0.029390423898153495","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@akord/akord-js","version":"3.0.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.0.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3de794fc5d57b1dc178875a72ac588e34509bccf","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.0.0.tgz","fileCount":81,"integrity":"sha512-aBirvz0i3z6/6WM43oguUUTjqvfAfyJGqvfjamiDkJs/jRbQnauqbc9VBUWJTwavJKIZ/V1tL/ydAcg8uNiP9w==","signatures":[{"sig":"MEQCIGkwS5lYn4AIMcAfgcX0s366K/K2kcnfRZ6g/KOCCHY3AiA51mkpQnLtbiFln/QYn3xl6+lKusyHVQJIMCsWZbqaFw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj49MuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMNg//UtpGGnr6VpkntvMbMYOKpFzXBCX7qhOOcuiUscYFdvXK4NFp\r\nVuJlezSiBtk973nDH3BNLMb0DPFu43sdOu1cc8fsO1N4YtwfOz32iox9vjnJ\r\nseSxY/i2OnlOcvQKwZ1MIqUuXX/PJ2SsPhnEWt/qhGBpKUAODp2JwrZi0Kve\r\n5sksQ9hy/PJCqm+kb9OwexqWrLioKoBfBYloWkXAxY4TcbmZxpg79wHePo1z\r\nsBogfUK/N8BsGpp15qLRSdjUjFIyKVLtTWajPOAhl+1dnmphZXEeJqq4PADD\r\nUv7Xz4O3aZvS/UoSci7sT69Ea0XMA7cqvBQ2g3fpGpY5jsimpW2YQCZCOPe0\r\nF0sCslqY4n0HfWJ6vq9uwQN2bcgUzUO2ZD8wENC4y3JxmdJrGtQ4wb5ts8uf\r\nm1lMT9HJPLpFDGUx2hd1ThuRpCwkUmXvU/pYps4YZaxTungsK6agWAbbgmEu\r\nwEXx5X2AnFhz47Chw73HthLTbaTEAVJv37o4VT+J4GGK8Q+UcMglltpw096o\r\nvFz1rq0+x1rkEwQ1d2+wCyIo2rIlrHRK1UdsOebRCipKNCkLhk8FIeFN0qkv\r\nPH1lZqexALzTMQXxJtPEG6DeIAvAGHzYVfajE88i6ZYRCW2G4E3DBeVkQ2sj\r\n66dj8IrblAuFTWTxu7aeOIDEpJl0cid6IPw=\r\n=2+53\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"dbfe87ee3d6cf22c908b4d1b9023a1ab7666b274","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.0.0_1675875118251_0.2640992252645793","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"@akord/akord-js","version":"3.0.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.0.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"deadb17a3914472e61a9c23ad6b7886de3826939","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.0.1.tgz","fileCount":81,"integrity":"sha512-KUphoFUL0xlysYV7CVTGBW9XLgzF2Xsr4psayg8wCCvKCJy51gA4Y0/BnriIIRUkgT9ZwtifZxgGp7Hv+HUv3w==","signatures":[{"sig":"MEUCIQCN3HPrtx7SdbVMrSJvi5DIk7DUEnFDGuMs/cWsxfvqVgIgZT/3N940XKpj2eIIAobaus92R3QBDSKnzzYDcWYqq8A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5MTPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIng/+IL9U6SietMPoTFKI9boZ9DCo0Bv97ANlbOQIFttwDSbm2JfN\r\n2pASOmGEQVSfRi5Ri/876H8npNx1WCRG4WC6808QQ7U6yO0xBAI8pTpux8m0\r\n/TDUY/bYgtAx8hPXjqjj8SU1nQFeTQ0rlK59pEycZ6tmxjthqVWPBRes2D7/\r\nSgLcWs5GKW1UN5w44SyMv+CZLoNas03raeMIbjSU3c+d+sgIq8YLzUQCP1Rk\r\nmUfgju9XAXS5HzIMIbUlWWk4KwyneJRSRjXaRfcQHsJPfFf8Vhk9HlpE5FmL\r\nuhe8edHdLwLuZTKRrmyfrujgkxHjQy2J8NDtJ7YjBf+Ddm2/nnRvq9K2HpZk\r\nK8s8aqeX+7jIk57PAXq1dSylcKwZzXBUc6O+RqHXZryHo48n34usDUHQiG5p\r\ngrKuR9nW/WEQxTZ7pBHC+ul1PET4mVZZhkScFyWy9kFEmhSC9O2CvXXFnjkQ\r\n8WglIttwjcIQRoiMYQZkakSdOc1UsPvHA31fw+OwFr7uSdT9NQQdMWY0MS5q\r\nceOguCO3Waf3xLMWdZZQR18sdwdg31jxp93YEO1VP4Ik0yf2G9ciEY0jVH5u\r\nDODXbIyNY/HPjRt8y5Rt5LecJ3S6tFiJthyzYHZuSzNZ9PQDD8TdMmU0Mx8t\r\nOZ+gBimJAsKO+7pRloEU8//g+OwzOA2f4F4=\r\n=JdEh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"307df9e5d8ebcfb3294b9727fb71b7b2ab7301b2","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.0.1_1675936975026_0.30637609949641487","host":"s3://npm-registry-packages"}},"3.0.2":{"name":"@akord/akord-js","version":"3.0.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.0.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"896d58ff2eeb7cde03067e9b46f2618af1ff1ee1","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.0.2.tgz","fileCount":81,"integrity":"sha512-3ip7WGZ7bf7irnilrSimdwEeWC5mzgrP7PPAu0kdq+syv4USYsYmJItMxTruuuvVcx1a3omYXcbBQTGuNx53Hg==","signatures":[{"sig":"MEQCIHAJ/RW1VUrrlOkISLZE2II4SeQGOY5hPJh+fx8ykwnHAiBWQF+wxKWElTaTN12XRvwGPCio7FN7FjIx2OpIxgmE8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5M8NACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBbhAAhP4YHn3nf9+moXS71nUtKCbTLjMy5U/tmgI1DBUHSALtOWH+\r\nvKULBA90Q3mMUgjPhhyhdFqNTgwdS7xhIW4B1URd9AaJRPky9dOzQpRoogoB\r\nDsomAK+A1B0um/o/taNxAhDgkIDV3803d+sx1703qCb9SLbxyb5sQSHxPh+a\r\nyeTk4YF4zqd68uo3bjJZW6FIpKs/M1Q05TcXjIgcUyVKDJ3CAU2wFuNrND4D\r\n3N+/5JSbVtVWfD0OLgn0OhIgB+ySWFvBRs37XfpM82hv16FE5/hRcrlWysfX\r\n4sMPAZmhbqgoLkAz0mVwZ9k8U1xY9RBJ0lyQV+KAMe2v268FYpLEsLTIw86j\r\ndqgjh5Kz2+vgGFY2BfCr0Ml+rK6ogDu3oJc69UsMNwnwnXbCE33W2a9vcnTu\r\nTGioTBW1X1UP3hmrXGOnh/uxcXaUvg2pPTKl10WDEg555eP4jdNcFOdWalZy\r\n2s2/NdFpo8NiL9UCVHjWZMRUuSccaMh5UcYrtdoAK3OypweoGmxHZh5v/56P\r\nXScMRvu3UOerj8IMcxGvPpIIN/w052sYK3V9PPCFCs2FP3pAcg5LrGMnGO44\r\nr9Do46isa8qYwtd+Z2FKVUhNSuSSOLqT9ayRZtHibUf+m+OwWq6oMsgOA7RB\r\n/hQy/33e3Ao06b5U2ujMszYrofgN9NIBI1Y=\r\n=l67y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"307df9e5d8ebcfb3294b9727fb71b7b2ab7301b2","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.0.2_1675939596860_0.6579131379543026","host":"s3://npm-registry-packages"}},"3.0.3":{"name":"@akord/akord-js","version":"3.0.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.0.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"7c110c72716eba15dfd0b395aa64fcd37b2e3658","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.0.3.tgz","fileCount":86,"integrity":"sha512-j6OCL93BjW+sn1l2vnc+kyUO4aeCTr24YtE3VGCvm92BhvuZyPMsvmHO3dyWZZo1Fb+kGnrzIVWIhCsO9YN28A==","signatures":[{"sig":"MEUCIQDSwB+TngvEU+OdqQZ6/rKbbU3h5k3v4DcJkPmQ7F+7hwIgcXpF6QTRoqnqJ9arpvnNuDuM0/mAm6FK5VspjENOk1o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5P7tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHQA/8DcLj3inLa+30A/lIcCBhodslB76/dxWF+eOZEWJFDwwjt2N9\r\nGTH9+fKvSQ88pGA0mo26muBGXgqHlZe06OtB1bjUU2m08xVdkQTvu0NxV22L\r\n45loXrDG+uS/h7e1Zqdlmbzu/Vn9uxcfUQDCwiI7cAQIJZqmjfohdvp1/Z0e\r\nyNH6pv4V8ou4JNm28Wgxd/Yk47ReheBztMHYZVbnaUOxyPaG8s0WTmJAuBs7\r\n8z4J0Di3lj4TwwRmXNbICHA0ESulmFV9a9WajyaOytVUDTIlAp0JN5M46I08\r\nwoEuEa49PckjgcV8kqcjeeUCAkC30W0UId3sXbm039ht8hmWNc5hsVbqKd/P\r\nroBZD95oN5U2Rtyo5iCjn2jzvm1Bj9Cx8LSGWVprqxW3Zt7ei1TvX3q2iN5a\r\nfWZKFX5w1loAQDPtCjyhcH2N1y/3JsRbsM+SZ025MhXoeQ5xQAfqJr5LWjU1\r\nf+FUUTqbCLh6bD/J6meeuCj/nGKpEO8Evlh6l6yHcwfKkxxXLCWUTMRQtBMi\r\nseulujVTccWz0Ll2RJr37OdtK4+FBSh4EHXfy5gVn/mfD+j4dXF5kzjCw3Qx\r\nhJc5BCdTKGfcYvoPKZc3GTjeMT2Om9yaWgXfbNWya30Q93EW9R20lzkTIJ/G\r\neJwvxGjofa5AweOW0xkOnNvu6TDdV+F+22k=\r\n=KyKC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=16.0.0 <17.0.0"},"scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git@github.com:Akord-com/akord-js.git","type":"git"},"description":"A set of core js functions to interact with Akord","directories":{},"licenseText":"Copyright 2022, Zero Knowledge Collective, SAS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.0.3_1675951853443_0.5410639730073674","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"@akord/akord-js","version":"3.1.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.1.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1db5d01745fcdb3ea685e6d770829ad431812d33","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.1.0.tgz","fileCount":81,"integrity":"sha512-iq2A1MlQLLoCsPLXDDjUCEbTfFYIAVYaHExi9anb6F16MkFFfjCeC62R5KMY3UwecJ04+flOR9amNPrddU5esA==","signatures":[{"sig":"MEUCIQCgZRnTO84Tt/3WRlmi4RfSL4bKvT1hsv8Di2S9F2Sb9AIgZvcaRYkTisiLfatceJXGVVxUHTIjZ/AMRBi2pYoIf64=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5Qu6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTYw//ZWaL78MURFuh5hjlfjORRVseiAoClleoZ3F07Hk+mAi39cE7\r\n2oTLs3oBLMjnePNsdfwmYIxofKZwuHIDABYITSnFcTqKekHvpg8SPPxgqdNZ\r\n8dniZDapUQpvObSRDkXl1adjVVXxIGsU8Zl7FS8UkS7KlngD9Mo8a9zWD5r1\r\nbQBCJDizCT1gwmFGDS5XIPle9DW5l1SNQA0DStPWv7dIvn/pUliR6AM+GNC2\r\nxSdJP3ekNbouf+qBZ/pQVdp7kuSDnB3NA1OOmBBO+GhEdlOoLGvSAE5Xu1mL\r\nSo49Fut31nyc9Sok+ZONtBMC1Zq8jdunYa566cOVunN2DnO1r8YDc+JN6w9k\r\nMvOfA93n2hzlnO1aX9pWokP3go4LgI1l4Anu963l4ZDf0X561t0BGwWQYKz6\r\nX4h3v4XzqgEAYBuKRbGMxDsC6DsB7tLXkdLqVMo8TfCnZh51YdUteu7xHX7w\r\nI20AtmIYtEd9jYSMDBaOsQvK6fjMXRNd0YcBaGXaxkLDh4fchEnaExswZQq+\r\nmYzJBe0IsNQ7LoNgg96agaUkuw3MGx6cm5kSk03dQYZP2imgAxYCb0+p9CrU\r\nAD9FwRTvCjzpq21KOihl20hxeQg7kjik5kUm11MsTReRaF87S9P3VXr+hkIX\r\nh0FNgexkUZCHfXunye1lzj2WC/zri71mh+E=\r\n=KRQp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"ce8d1f209b31d43d39b89de5a7715e44d34b5b99","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.1.0_1675955130301_0.25040509226417584","host":"s3://npm-registry-packages"}},"3.1.1":{"name":"@akord/akord-js","version":"3.1.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.1.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a83fcf0aca0bec638e8c3403864855926aa6ffcd","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.1.1.tgz","fileCount":81,"integrity":"sha512-t2MG8Y3Aytw1qj3wjHU89A5g5OKJmMBGuX4EWR72aSmaW8j0eHh+fQkOSJT/Y9sSEtIzQ/dSOQfef18eK+hFNQ==","signatures":[{"sig":"MEYCIQCfJRxYL8gnddMtCobwH4yKq6i+BsTEp7j5M+VNl71ZAwIhAK7/6QXNlmol5Je46/Hpj9J2rc4u7KB+T8knpHB9hZt2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5XS8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrYZg//X/l8CLcILlS3e4sIkCgisHgYWiayDbYkKo64KoDmtukc4JU9\r\nJYJAHN2wLXWrtYMJxkmUFP2cQReDb2VwChr678gWeQYAR2HWeDF4Kxu4Y6DZ\r\nZ/xxa9/C4BHA0eJxXuI07Y2elFti1aTaqCWNhadbH79Ap59jVtmbJYR1j7fh\r\niJYZDPJcAplaBQTJTeTeV2J0jR1hGJCikpIkGYN2BOEBmoqrvAIKOvjV1afT\r\nVObAw2Lo7LmgTrDshnCHUDPPgD5GrvkE5uCm6W1fQkcUp0WYLsiR0xEmArhx\r\nZgF4Kt5+8Ly7t89VQTzJSiZgIqxqZA+TdpwQWnGslbBPGlrTH5tjKaU1pqlc\r\nkN/tDNsJsDot/JyFJ/L9Ci3Crgs04+uX/f5dI6eDJDGWjgbC9OH0tFfuO6Cf\r\n7Bk4P4EIEIC11ODP11fog+/ii43kjy5wsIEW1PpiT/9hk49Eif2iQOpwQAH/\r\nKy5ba62QLncwq4blWUdnf8I2xDBHU0KiPaASLzkKoDQagF06yWmVHMa1aNyI\r\ngxDSu6Wcsva2vfsyOH9rL3hYrfuH1vwfvy0durU2l9NYia7KW5xrvH+jx4Rh\r\n4kFq4DliiM2ptrSHszO7qP/7JgyqfiaxXcYWaeVD34kCnT6c8DTxlyuyPEpE\r\nhmWKdIshONEBfsjKxmqOfL0lv57d+UhtAN8=\r\n=MZpY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"fb58672cf9592bb6336cb57f14184f63a7cbf141","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.1.1_1675982011949_0.8136851178656943","host":"s3://npm-registry-packages"}},"3.2.0":{"name":"@akord/akord-js","version":"3.2.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.2.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5ed7af8781e09b37c09fd739af56bdd0dcfcdcfe","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.2.0.tgz","fileCount":81,"integrity":"sha512-1TAPRplBNXr7OQdtw28RNEy0TnJ6lnwvb6lURvUO+uG+zghLZGz8VENMMHYbqJNrTytIURYXBaDVUl7tgWAwXA==","signatures":[{"sig":"MEUCIECc+ndAQJuN8HM+f48rglNbViAov343CdsbEi7DXIR6AiEA9vUg4XT7XoC2xMjgOsyHUj2G6HVJWzw9mbjWs1GTee4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5hi4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBSQ//dloWW6JtjXr7rd8L9SXhlyLh5vX8TedVu8cxQV7Y8Vl2+jXq\r\ndJbxnWIO5tFd4xlFuEbi/YwiL1rESY9EdAVKuxeAm9zlmH51KDISuJPax7nt\r\nD515GEt2kQthrHLIxUKrPa2e1mqzgEsukDcJeGk2KKOUAQnMK2ht/uCZfNF/\r\nXZLE5jnKpdMt1qtytshE7tSuD+9ubaXEiiWXnBnoI1icFIRYrf8y/53k3uIb\r\ncY0iPwlUCUQLBCcd1x4B2bqoJ5x0t7+6JnO6aCdxgVsOpgcWP6J/6svQ6Qhn\r\ncIkFZWN3YoaRsMpUlcxOlE9WYLRkr6BYrC1jYZIthTpKstBZItFf2NMBb7u/\r\na2rONoBC7gv5srMNTehNczNUvy74pUwq9rvhM3g7mGWXz20d8rvqiTMO57LC\r\n0wq9FPiMmI4oV6HGKy8Z9AkOOHdGemf+092ZMzjEB/VP4KF4hSL9wHtZ/PFK\r\no8nFVueRCOh0seEILXT/1MO1Fjo3Gqk4if8dlaL4kr5IRCCFt95UafbzBvex\r\nasQuOfTqpo6Kml/U8YnocShb1bxFrp5cctsP/asJuC9gN6oS6soaVHH9Sh7y\r\nAgDlLvGZx5eLdYO6aUYOUd82vAsy06oZwCsQPjahgvqB59ybj10ErkLnT9Fd\r\nUMmRytofNVkageNeZ5Lrqmk6WYBvy5JGyZE=\r\n=AWzh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"f3ad3cff5aa87bdd0ca8bd1743031f7da9b79e70","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.2.0_1676023992346_0.9018422903587657","host":"s3://npm-registry-packages"}},"3.2.1":{"name":"@akord/akord-js","version":"3.2.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.2.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9d6c42efd36357d2ea1f6e17fc6240827dbd993b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.2.1.tgz","fileCount":81,"integrity":"sha512-x3+zmnnwaAOz1Lx+zbT8HU0eQ0bBJhdws2DBXQr1toKpWSh5g1Vl/0l+R2ut53YS2vwB8C6U/D0REJQ/P00AFw==","signatures":[{"sig":"MEQCIEEa32M2R8QikBCcrKoAlsXn3WKH4JzwC5Z1tJ1svoPoAiANKWF5FOOPIWH+A3Mf7UwYDldnMY8/ptpjkxCoSMNK6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257092,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5lPmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9Ww/+N4tgPCH2cMxqD1Lg2t2A86dtGiYmpP2v10JqJU/npHknlxsY\r\nSe7zFMIiTQH/EbvpBc/bd9WRkKA23CiapdbXRN7OzO3D8Ql82PFp7sGJDs+M\r\nZs4MBeRgvg0fUbiNdpCLns9n5ysNTARkQgZyU9teF3d+kHX8+0j6u26kKg24\r\nxcfNDCbJIIQqaIQ7RBObG5o9tAX2Pxok9VeBa5AfswKXPKcfus7EdkbkmK0c\r\nYC1twiwCtejTQWDiqrmql9lYgAjxbCsxyG4YVsQpa1zSiKxqEfhiSuqeMd8n\r\nIboq6U21HrJXmzo95DcVK3cXH7bBJqPOzl6LeEheltpTMUmixGI1cL+GDRy8\r\nyzqz4tfr2BSPyGPftSM5lmXRq4GO8kVf+GOBmEstJPRHatLhCo+02MQCtoui\r\n+AAHn48MsiXoXuxq2abM6JWC40wm88V8FIZHExz+RavfmgqzF4c3PWaH+Fof\r\nA+wVWHsE35CSm+/yxTEHroXjFmFYqhOIcoL5IXkbvS91pyO6WUenqC9Hbfic\r\nEw7HEhDAXQUAn32YhSJOvew0odZqeVue51vIJiKz8Yq3UKqSWGXDTxjnwyt4\r\n0MzWqEQEbEx8derDb9o41xwukhOmNbsC3dTlSFfRQRUxdbVRWJ3dLlIKZBVO\r\n00XPVzYrCYAYqNl7U9zrx8g48ZYW9Qu/gKU=\r\n=9EJr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"6113979bedbfa5a5b0fc28e83d344befebbecf22","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.2.1_1676039142542_0.5079065585528302","host":"s3://npm-registry-packages"}},"3.2.2":{"name":"@akord/akord-js","version":"3.2.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.2.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e1bfa625920bc9ddca0c025ad45dbb9fa5fb582c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.2.2.tgz","fileCount":81,"integrity":"sha512-qBR7kb0XxOxPPMPwiL6SCcH6HA60iTN5yOCdEPVo1PN7RsEkbRfNzTXk09dMY69iBM2kdki22KSTsq+82mx6vw==","signatures":[{"sig":"MEUCIEvjDOq180deNFW/uaXAyYGATpkTgXWyxUiGQ8ywJ8nyAiEA7Q6CfCT+22Xqwn95h0+UZhV8qWKDl8x7C2VcOLrXOas=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257105,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5lSFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrdyhAAlBLTtPsIgo5XchcbhUUThc6LgNZoTp+64WN1VQ+avHCutoDT\r\n1Qmhkzk7ADFVPAQu+lnDa/YB/Mn7NF8ul3A1W1WoqRjH+v7/MqDnY0MLXedA\r\nXw1KzvoguIe3wAb3h4u7tvxyKF3QvcaKzOSy5Ltv+4pvgTqschVyFMEo2WlA\r\nAtu+9Q1sQFzDs2fEh/z3t6IUzMSAbbJDyTmPupl4ZAhukJvcJTxm0ab8TMzN\r\ncgOrmFqNj9Rhez3YIrTZ3flIHoYT4QLqDqzMz46487ssQuiRfEA9IolYf5CY\r\ncAODg7hVaRwR24pGI1s4O93ySPVjDlf4mBWdAHleg2F7O4z3bDwQsVknFEAh\r\n2Y4ytcPP6dWbtQn1IlQiCpa1qU2orCB6W4S6ZHEgbYlMk4Ocp+ep+u4/f70t\r\n5KEngbNBFXfjd8jvYL5fk3KitwceriBzinS4TaGQ8LKC2nnjDdnjH32BJQ0d\r\nUGew7/c/32k6cwne0P7QJ1jjznnItnm0+IduFI2EUjnsqzmu18g6ZDLIQ++M\r\nDDRy3u5njAAmxqqq2kY7iLfPTc5Nh12BoFxMT6ntPt+/YHbdbiI9L8I/1Rgq\r\n9a6P1hMdNvMdEBPPqc8S+pnAx5UVLWW39nmpVMRRcfdlWdC7PcBgXjc+ngBk\r\ntMqjGUoXDtnk8CHFTDxJAo7eMANWnnEjk2I=\r\n=tLDr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"ab9bb814fa9cf73d9ed01052738c8b84a86040b2","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.2.2_1676039300850_0.8413910780202303","host":"s3://npm-registry-packages"}},"3.3.0":{"name":"@akord/akord-js","version":"3.3.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.3.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a990d1fa7a472646a774c6ab0a8faa1ac88f3a37","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.3.0.tgz","fileCount":83,"integrity":"sha512-vDti8mInuMJBfk4YzqJCqx0UQniqpRYdkAcnBfcStAIaGVDwriOwirH14mLDaNkp2e11VW4yfgYle1zlzKavFQ==","signatures":[{"sig":"MEYCIQCQDp7PP0bEmSo692/DF/9nlkpF/i8k/0ApCxIE1ob1TgIhAMFVk0DPE0JBZA1rDxuKWQ9gnHDdZ0zWgRNiHOpYAJpD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":258521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6VZYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4eg//Vr7SU2cdvBFMgJhat0p1EO/4oLTO2OVUETqSj/BY2w/uCtnt\r\ntj70r+LQcwBSlECTtd7m2o6saFwNSyppdICPf7Uw/uNcMCM0kq3RxG8xIog8\r\nwXbGIT+rbgrc7DgrlEeQXKUBJ8IUMDlAfcFXebsDAAk0zijp6YRIJZP/4iGZ\r\nrFPayLlS+FWTKjgVZQaDT3ADx8naSgsGN4w+ijvJlzZsm9MTDxt37m1B/Wzc\r\nuJnGHaFiKoPkALjeGU1pDQpsbZBTyJXzbdo+Beq9c3qiR+RIqFwY1n9RzpF3\r\nqYnylDebjZVzlOOi+4kJiWS+6B+cHNEdcoGPKdcA5KInhO3T25l5D5wNgNB/\r\n+DkVFn4kSOnEoGwiazkmKL4kiOj3oZmRhTyBHeSJlKPdhpIlQLtapaoV6TqX\r\ndY4u+JxF571BzgzKFN65xUt/mRQJqPeZfI6NUU2Cv+xPUPKu2OWFI9/6Z4bK\r\nJIT48U0T/vrE29Y+HjaQqmAg679aFqunNHABEZJW2E2zyqWRdmxUTQB0VXU2\r\nkuMEYlMvMLM7LW7LDE9JrGqW5hN5IKa9Ho+T+1hPq9oC3ZfseQOJ1LXt+k2S\r\nN88LhnN87NQiav9VBmC9Ll0xpFXOnnwjz38sPgZZq2d1hRKAdEHjEM6BN1Av\r\nXJVHDZVfZ/foHYcIiHvie62KSWn5JzPipgQ=\r\n=xKIy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = await Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = await Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await Akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await Akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list()`\n\n- returns `Promise<any>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaultArray = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted membership\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membershipArray = await akord.membership.list(vaultId);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId)`\n\n- `memoId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted memo\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memoArray = await akord.memo.list(vaultId);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` (`FileLike`, required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(vaultId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` (`any`, required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(vaultId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted stack\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stackArray = await akord.stack.list(vaultId);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`string`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId)`\n\n- `folderId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted folder\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all folder within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folderArray = await akord.folder.list(vaultId);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<any>` - Promise with the decrypted note\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `list(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<any>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst noteArray = await akord.note.list(vaultId);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`string`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`any`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"00650cd5a0659902d16c9a4869b92840483565da","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.3.0_1676236376762_0.29172659820443236","host":"s3://npm-registry-packages"}},"3.3.1":{"name":"@akord/akord-js","version":"3.3.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.3.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e2678ffc40c8adee46c9b4a8c59275b56ae907ef","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.3.1.tgz","fileCount":81,"integrity":"sha512-RbguNOOn8NHJkwZ817+TVIaM7LOFE1fwkKs51WPXHswdEQbkTzjQGhE/BvMw9vncztF5o5oaWej6EPVbIdFvJQ==","signatures":[{"sig":"MEUCIQCUEPSHDdr0QgON1nxkEtPrh1l801SgdB0DDEA28Sdl9wIgP3cb6dvJk16w7xSYjyLUfl9vEeAZSHmeYZc8pDx8XVU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":262964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6h57ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoB0xAAhKpx/DY9rmTztV3/+kgmqgZZ0r13V/Wva/L4BQZzmfsPoqmg\r\nALZvHsG09FjbpTXnMmNGEmeaPPoH5l0kame5h4Mh9q4352y/BXBjiCmWS/dg\r\nZsi6OgLLk6RK1jbzr4tCrlNHItQinTMk8x2ShpTXmmS+EZNV/3NBGyUs4Fvf\r\nwwHfvbeMGE6ydgq4M96fteXbL3uNb2Z3oHje3SWTiFha/KbXsmXB4sehQ9LX\r\nOwsyDiZX6jRm76lSRBwuJMK+cMGby81umKya8ELzMvjBmEjumdoGEAd9DMW5\r\n6+aBnP1kfN+CvO2GF2oMfM7LH1WDGcXQcGaJJlICZpHSJANiOqB+WdCiF7iv\r\nrJBcO08JlVEe7XCylwY874U5vfCj/f2KrCulfVLdVTuuNmPmQDfoNB+cVthL\r\nuBbjH1KF82ridfGjvAn3hklaG1rYPCHtSQTgCGrSToY9R0xTWfuQh15IOt26\r\nwhNXhEfsJgglhdYvGPgppn/4m1+/ET6KkHbfH5ysTMkkRkEnkytMunXFVHyo\r\n/IhgCJfuBlLa14KoWvkY1IaiZMHaIUY0dwcGx0wvJB9NqpHlhMfvCI5XisAC\r\n68rpRKcjaLx2QWcWzuYrenwkQbu/Y3fpTIyWHwfJCJaK2wEZCytq16vvJ/bt\r\nHgROMuEeUnk18CrHt71J6iQ6IFFO1xRFQ54=\r\n=YOv5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"951d89d6c1838efd4e856d57ddd0c016159bbea2","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.3.1_1676287611053_0.22853660685591826","host":"s3://npm-registry-packages"}},"3.4.0":{"name":"@akord/akord-js","version":"3.4.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.4.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"77cd5712a7cd9bca623d5781258ae08f34036048","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.4.0.tgz","fileCount":83,"integrity":"sha512-gOBNIdi/Y8FMWWT9MQnE3pWyKVLYdeImWORlcDxjyE7dKI34TeZjdQ5hjwGDH2Yv3sG4mq35LNscU5MCq6+GOQ==","signatures":[{"sig":"MEQCIBcOHlmSeCnJ0K6xFwObii3gu22ZKx0Pj1F4t2E8fD0QAiBPplI+SmIxA7dP0tXXyN3A/HTgVBKqytknHmy94sJ53A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":272854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6lfLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqwsQ/+KAa+H9cDRulbET/l8g9aj9zZN1L6Cu9T3Kaej0xjoSwuqaQ7\r\n3LmXmp/J1u31wqOSAfg/+5On+GI+9RSDlfpj6YcDLdZnlZf8OyesvnpNfb3M\r\nHRVIwXQo95aDwpqfa9FvGljFxCzDIS5V+M5Fy3o0EuAR4erINMNcGEIjHvzH\r\n/PifeIu8UKC1qWAJbBfRmnk59GLGHDLN3v3Y5WEcyO5dAOF1o0EHeYBzTrQz\r\n+vD6mB7NUQef33x9jhKTXPFM9qAy90op+XHO+cjMu/Gnp0oBGx9hHzsbYGvV\r\nnbTwVv+QsEw5nerOrcBEP6oHHYXOA7aPgacXQFMhRMQWnLfkUncgve+rPBSV\r\njRpmc7HZCwTRNp0nbne7b46yhIEIUCZOyY8H5vtj8ylCbs64V+trCI1S/i/c\r\nVXbO2o9LG+Z3pHhflBgamnnU0CcOHvXgwYbPEIqZlTcK+tn4GfldBmb3xH/v\r\n9lepV7zfFJXf67lrcOoJ0AVqhw/JPvBtidc2Z5vgxiStc2wASsRBYOnygGX4\r\n5fZ8PT3PuVpM/vF+rprxr7EFE2ZTOHKhxPwLlvnDCyoAMKLfRDVjQKEbX56C\r\ngcTbThmUyQ4iSRiUKG7lDRO8dtE3Jwt8nf8W/g7EQR6TxeaR6T9pfUouWDuX\r\nYGFZZQ9Ae3+TXTGgP4bZufRxobEfaCuBU+Q=\r\n=7p8P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"6243453ea4d39fc80cb918548299fdbddb11dd81","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.7.6","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.4.0_1676302283205_0.044947391938670256","host":"s3://npm-registry-packages"}},"3.5.0":{"name":"@akord/akord-js","version":"3.5.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.5.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c9c48143ed6f22a5064e8c6e02eaef6839e19db8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.5.0.tgz","fileCount":83,"integrity":"sha512-h8A/oT7WGLdhDCaE1n1I1PP6HVBFbL+0Ee5TbW3OrOW96ASWoDwOui4Qyfz636xegro7911UaiSyGiCcl5Qlkg==","signatures":[{"sig":"MEYCIQDNZQ1+cX+7M6vczIJtViGwt6l7oAPD1Oee3i3Y/cr7qgIhAIvsw9bcx0qbAteQ1cZ/iqDzHmnmrfYaQ1yrLa+dHFmM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":272854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7kQnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr7dA/9Gx4byipXDhxrwXPyucxhadHEOR+ZwSOxfdsKxsXqPiZxo7up\r\naZz6ZUSwRGTVXKBjVeZoE69119pQNT999rK4yRxvZSunqdeo1AUBOaW1C+9L\r\nqIO0JE2+Ito4gYxveOUku3kL48TyrJiT0NfZGCgj9fZapiJs6Lz3jxxQvWgC\r\n1vhxaSFDZo9BiNbTHK68adTEhJir2KAYdZ8YD2yQA1Y01br79KkCDuvPzC4Y\r\njt4fggLq7XCq2xDV0rQj3810c1PkwKVUGqLn8wDiLnf1wqqKgDteT6gs4ttg\r\nWjP15lP8iAtvg04P/mUXo60S/xWhn7gb9MvX81YdBTSuRZ5hV9FtjZQ8UTSS\r\n0bUr3oBo1SWqS7uOsJWYUXvL15vxD1/ceGiCGbhMjf+G+I3EoONB3CFSxf+r\r\njuhBogo/INAGGWVIRxfAfgoHuWWPlq2DzqvEyShUn17v2/b2nyJjfp7S+O0G\r\nM61Xu+z2CtbV+bTTMgTM7o34oSa7T4s6ojSS4Beei5RoINNIQDPEj/b3XrEt\r\nld3c9oIqyeOdt0e9c5SxgETzr00mvfOrVVRpcgQARyS6Xyl1yacEvqMdm1Lf\r\nVOiY7zBElEKCC2TnBKGHkEgHhz4+Htj1w/j24YFHwALa2WbAPFxMIaSpNJ5O\r\nRbnM0LdUwAXXsOESu9Pl445ot6JA8o4UXz8=\r\n=UkgH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"65b05e45313ebf6b3cc404b9ca59d2c7352c87b6","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.5.0_1676559399225_0.572664831243962","host":"s3://npm-registry-packages"}},"3.6.0":{"name":"@akord/akord-js","version":"3.6.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.6.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5e291141bc75f6e0b43049d01f5b244817df30b6","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.6.0.tgz","fileCount":85,"integrity":"sha512-0MaOY+oApiaTnkOzuVr9t59xNhtty/LYXlTT9/nfz16wpp6sAPcoQt92D0u+sxto8z3m2CknLvosgfO9UWrEXA==","signatures":[{"sig":"MEUCIQDWPlBPyPsXVLvyHeo0VlLvdslyGYa7m4BvEVcl9MpKJQIgTOrr6jekTfBAeZWxNFT1B8GEouuNZ0M0T+VVZCYobhU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":274270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7kSwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqt/A//WDgCdQCNNFvK9YSwxfDF8QO8IEBdsUWQDlOaBFQcjEfay1wy\r\nxYyai9AutVz1hbXw3DDOQsSPrfZfuc2a8vAwM5v0h+U1rKlbV6PDwV9RgVO9\r\n+5BrxEtQ0Qb8t3DBhe52O/740qsVDRv9BJqFGywEZyNDTbQUQ31GS6TIqwZy\r\nSZ1sqaH2mvHaOXr3Dr4Mkj7bwjg44V4c/E0G1iFBOoPiwbFmGm5QND9Q86xR\r\n+TfA8IHMqTLrIMmSxCFxyhrxQltuyG5TFjsilnmMeX1qWu3pT5kkgiuB5/a/\r\nrHQ0T5CFD/MM4WYBKegEt4msfGnkgQ/oLPv/Z7Jqh7spBtuoEk/KPlEgVTz4\r\nqOX+HomiEfHBBRge4KycWG4ocHQDu5oL0AX3k8iQFpZTJP2XAE1eKtws9DOH\r\nHkPnO9MtpPyvfkfCy+EUfQjS56WOsx+KYSofDjHT3PoUJWO+cQyD+7L/Tmoq\r\nUNBQmeXXcRiYhLPnrU3NAS3Ugn4zduNF4B2QnrbziF3mN/flPs4joEgSBQIY\r\nN/jMQavwj/3yzzWlAfBm+BD68txpS2ED6nsJpCz7FxWMaWJZsoNcBxqwrf5w\r\nC5lzfRXtpsVeOZyPkcvTJMz58bKrIADV60dPt5di9hBSjF6Bp9KibUyclmfO\r\n20F9JLtPUWT2HZ/w3TeE9mt9x0yDRk+pTPo=\r\n=b8cS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"56baf0205d003e18bf362d6743a0ec9994ecae23","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.6.0_1676559536260_0.26396897331911484","host":"s3://npm-registry-packages"}},"3.7.0":{"name":"@akord/akord-js","version":"3.7.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.7.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6057a80911c894cb63dee24241a8513c515e14bf","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.7.0.tgz","fileCount":85,"integrity":"sha512-uWd7xJdLsoAm9GXDNKqKyzzd6Zz15mFcHVKFhV6hUBUKdzSuwq55qp07okb/kh7juA6OaaTKHHlp5YHNlj+2Kw==","signatures":[{"sig":"MEYCIQDRbYqfffAidbsPVzrkvI1u/4WN9O9AF8rU+j4vqJLS/AIhAL4agkm/BAfkJIX/kkTYN2A7JOo72kivhgbj0ZHOqT/F","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":274964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj74UbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoV4w/+IJY6oJOXDDeSGNgY4djRecMb4YLaa/XgvL+sr81RAdlYtAHt\r\n4kjIM6rv3q9bdDUH7A9lPVIRLIQgZmR4QDKX+HRc2CkecqqW2UvLJgF27cOs\r\nf18rKhxw30Pg5ceY992UQrz+ETPfIUOv1YdUY32rYhC7mcDlSK0jdSgtfQkz\r\nlyev4hp58V2bu8iAi18Njnih50Be430GqaAhrcORJ456YVuILsbxPq20qMba\r\nSmAu0vvl9ySdeJ6LsTtscWJI3ohth+Tk1F3WhomnaewYMAP9jXcyntLR1Hua\r\n8I0/zC2Vxnotrq5h2EniHFnlXakZPjHiyoctrJZCJvFQcV1A+bb1S+UE0Fzu\r\nvagr0jvCZJih5rlkxfsuq6AUUVCxlwCwKwR7XBtvM8REhwjvkWcqlDagk9UG\r\n02eMR1G6KUwWsmrTUyjCtQc4/2CYnk/Ou5tLVHxR1n727whj+ghZYh8q7uNQ\r\n42Eih+v/GB21gSvG3kKiAjgV6kmfdrQzKnxe8wh8cuZD/vvKS528Sy2HK00D\r\nehMrPk0Sqwg9y/PtxHPAG0od6gb9QANSP2DrLGeUMhL9LjgZkdoVxf2AXy8U\r\nkY1hh1BldkAhG8rxjSWHkb+xyHKPG86DkAYq0pGKeW3ktVgbRlZ7NX0zUDC0\r\ntRT3Q7rc0COpGURfhmQV6W7AMoNJdk7WtCs=\r\n=34W6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"b7cf19b825035ebc6068de2524887f53218feee9","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.7.0_1676641563255_0.026722884886160037","host":"s3://npm-registry-packages"}},"3.7.1":{"name":"@akord/akord-js","version":"3.7.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.7.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"86f8c12bd13928e933bc335612b61910ef36b2c6","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.7.1.tgz","fileCount":85,"integrity":"sha512-z07API64dnHdCIpCANhxNWgYgToCcXsissNmr1xd/bulaF/lTJJDmvEbJmxdGVgkmni/T/9rGOpeo02a6ANRVA==","signatures":[{"sig":"MEYCIQD9J9w5NIHnJByV4F4UGKJMt0D2FpTRmTUVjnBQVz0bYQIhAKM4iY4PJfh2liJZAfj460RaksV3CZlAnWptnAX0ReNZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":274964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9RTkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQVA/7Bf7QG2qieoomNNrwAeYwCqgPErgDKpgtCotC7jUtyQe5Nelm\r\n8A8If5OPrCFcC3Yl9as3S2BKKHqLFqpVBnx3iXAL6qLzuwR9yvZpSkMT1upt\r\n7zYPSYYbb0YLKzK6z5gF6IJ9sy/tqvw3gre2uVWJf65Wv1Zbv1x+ggYCLjQs\r\nAT5moUCJO0j0xODhvYcrMUrLa3dpibY1sOFIlQpUmN0jBDRMywiQoWRcdTx+\r\necxtwh3kXUcozjF8tW5cB3WlHHvhtd4lKFKuVLRbSEMLlaK4D9ZONMRVhKKG\r\nFwkDSo+vsE5hF8eL577JhW2wniUkHimRas3Dzcmmo/ei0qBVMWceBVSNoE9F\r\nDZd9QdH0jXd2Lt4s6hceXen+Neqr330YoattJcSGm2o+e8Tce0EKUE1N6ksB\r\nj1NJTdGi549QuDh/2Bn5iq9mVl0O8bnPmAkDkOMjXopftX2X6ZVD7RD+C5Fk\r\n1uxIxy4x0aYfHAC8dHEEnTRAfLFAD1vLB6idiv15bmNhKKW/5h+47WG3PxJj\r\nOoKXTuiYfh+mdeDuS5oSMwUUHXu5QbkwoDEoZ9cnYVcevU4zhtaOv1oXSkz2\r\noSxchg3Ccdf2bxB6aGJzb4gaYYguiy/bpzyPF4cS2qJaWZEwJLxoxD56Rcik\r\nLH7MC3Dp9R+noO8KvicPPVJzp/EHjdLHedw=\r\n=EwXs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"a25f9b27f4cb7788098eb6744f06ea37ea4059e6","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.7.1_1677006052112_0.2628528778105317","host":"s3://npm-registry-packages"}},"3.7.2":{"name":"@akord/akord-js","version":"3.7.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.7.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6e0b5dbeb78159ce494c739ee712f875b27eb878","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.7.2.tgz","fileCount":85,"integrity":"sha512-kaiwIsDpZnmnZ+pJ/cKEDXRkh8joG04PD6wU9oNsVYEqhUi9HY4Lx53wlNLk6bC8DXl1D7d3YA+PNqRgqYln7Q==","signatures":[{"sig":"MEUCIQCvfYaipN9GJgP3edthcE1c5R70yt1cSdmeQ9mwSeb6ggIgEloEoLBKWt6ZDShPyiL/7Chs7XUzATQRULWFZ0l33Lw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":274924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9gvUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrR4A//T+cOgc2MzMx1wzccZe6CyCAJAi/Xz9BLG+c8UsNtwU+xN8wQ\r\n8K6ZEgQu8PznFDAr61KjfeELMKIQlJv0YcOoh+M+6MihhkSwPUNHXXQ0RbNL\r\njubNsg389bh+aBGMI3InyMZy1skDKZ5/3Kb+H0iUhi4GGto61QI/6Vtqu74c\r\nQc5WerS7CA1g9+VaDnwH3CHEUpOeTubGc1vQ1d3ZZUf+u7eVWFd7rq2NpN1i\r\nblRFRcL9EcZvNDHWjGUkAYh1BHlgXVbcm0JlsZy0RVEptyMMIiU6aw22719k\r\n6jQ8mFa9Qyp/9TovaTpRqdkRcDYBQ7PFKgHr8Cn2Of6zfTquPziDdlHXOZWe\r\nOXmgNHzzXEMA0oMDU370MKWmGx+3jnJAWjBXNIGDdOP8WVGsXB8TYp3sJAPr\r\nEVVaG1OhknQbuqQoLt7hTogR+huop5slfY0JuibfsdVkcPqINwIQSOmhQtkh\r\nX44LKg17f5vUVcBinQ57Pbk0soFDW4YiUNIprEnyFhqIAgQpdz8iZBOJz2kG\r\nOmei0trlLCK1vcxXeNluPabNzMndFPwQ2QvX8tNbm2OUQpwikFdRwj+ovnI2\r\npa8t2zHcj5bg/golGnvK6w+s9bCKA0F2p4nUD57fpclY4lxSjhtdkxUsU2yD\r\ndjbv/9zx4rI5nc++XhjTVFS3NBxlR/NSv7s=\r\n=jyzv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"6b8186c461b384febc5cfb8601ed25f5e026da55","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.7.2_1677069267921_0.8119808086509517","host":"s3://npm-registry-packages"}},"3.7.3":{"name":"@akord/akord-js","version":"3.7.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.7.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3edc43054285632d6df490dcafa280af917a3879","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.7.3.tgz","fileCount":85,"integrity":"sha512-DPede7O0NFcZy6FUnnw6xdDP2LsC3o46hG1nR03xln1zJdiZFICdfYLQ8mFifpl4CSZUhwhY+IK3caQQCnBp9w==","signatures":[{"sig":"MEUCIQDb/fcY7asj56+m1vBRor7zh7mgqgVnaxREh+DNTqX+BgIgcu72TOvjmuIOLkJWozFVOwGjhcyMyo/nIpxQ3Trm7jU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":274924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9hFGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+4A//VHOEly+MkxQwuv2uNW9ZH45BuqL/PJieceNnBy8G1gFr8XUU\r\nzkTLnAHawizzjI5Kzd5iZr7Qw9Fl8xCxhEb0UnO/6cCj8RI61OVDbWH5tlLw\r\ng+hD4xNK9wLTwADQjoDR/zHGoNyhT++uebq7Mdk8xzmIFFhFH8lOiK0pKUnd\r\nQlWnuiYzWP9TKRNJC3dX+PWZXfpIUTuzRqIkGR9D6NNTfTxzHomIasx7KpTo\r\nwcj8LSZmqlaglD8PErZwtlir0dkmOj489Se6Wr63LTZEyh8RCcso5pCPspxe\r\nxv5c3mbPuQ2fSOI+TYJ9+p8fRdXnru1ER4iYUGF+g8F3ujKB2AAPAqG8rhah\r\nbKyHxvXU9urWXxKqpue8X+Sxado9B09tG+1waCrEkttmzl+ssCIjfp1nvpvF\r\nNMh+wiM4ySNMKpy4mTTwcM3/pE7/t4UNk5vf9biAuVKrhweAONSjeS4jBb48\r\nnRWpNOGq9zkNuK6PoNWkMxydsJ0dXetbNUj9eoDBWN9yrQconGMv207hnaxj\r\nIQw1Qq9WMj4POH+pxPxSpq8LCcz3Y6TLVBqysSjFMFuw06U+VUxrs82IHiqZ\r\nfNUYAMpEDdho5HblQcIOiO9ww+AYpv/kk0vvtDfhTmBLL/oA0QF5oNOVqDg9\r\n4vhdDX90gcVg/nuV5/C9bd1WWr424YFP/jI=\r\n=pbVE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"5ca9fef1f246d3c8101c59ae437fa3d2a8363b1b","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.7.3_1677070662743_0.4937457717089446","host":"s3://npm-registry-packages"}},"3.7.4":{"name":"@akord/akord-js","version":"3.7.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.7.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"80cb90e1e3390a2b97a3488c0473f99f5a3c7eb4","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.7.4.tgz","fileCount":85,"integrity":"sha512-wUzoh+0Zuti8MFUu30qBq62bS/gKuagqa3wm2Nn6RHIrucPia9jHDcp0lNWTYxMvU0fsgQpM7mWskTYGrGqM9A==","signatures":[{"sig":"MEUCIQDEH43tBlfFzwD2+2tR+A2RP4raEupx+RdQc9MPnQTkigIgAcHSCqFX9g55LjLtaxhwv5WChl+a446yrMkhwGd1130=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj93I5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMNQ//a/fyIZGGogSbLDSbgkIWY/VRTCAomQ2un+CKPNCrej1GbyoF\r\n8i7P52LUPCkaC0HN2OJ4vhshCowzipfpBsM8uzRgP2iXbus2WHhqnSNJkPDy\r\ntk/IWIyykLZYhWh2BCDYsFyy7cALR4sJBy/7J0hYlYDmU8RRM8gmIKKW78Do\r\nXogN2VlafsUDx31YthyNgUDA3nof1Gm9savpXIv1bgKHu6SNFg94yJ4twg4g\r\nBpf0vmOVh18pH/wdiYBonuSXHu5VIYHx6EnnNq7jz/yEQbDBhlOMyuNkPev6\r\n26EvgjWVzPbutNbJd3uq5WaxENPxYbGxkJzcDzyc87Gws/sq3NTbpHSqjb8a\r\n6Fo77f7xEQUjYpCyNzGziyxS4EmwZyYfaaFbTm0dRcTodrIuWUkdRPuQ9rdx\r\nRjK1RMOp7IzjG5UQlcY81rXXgCrG3OPKxx7XR3foyajtYkkghkQlElKoU2+m\r\nFUXJI4twPKSVA7Sp3u7Cltdj8nbZ6cD/qRwt+NClpB5EVCGExe1oPDAFlkel\r\nrY7xxJ3z+adXT7szgIgFzLveK3x5ClNckker/gsAMjvMr70+zV2IqpBQzIMc\r\nBtdPJvmXhyT6sFb3fxTz2R5AD0i2L0MmJRLZnSFgukRTwHvWbzJ5jnJV/0Y/\r\nA32Q8nKzeYN6/pGpNkMLnXl1cMdygCcDUeU=\r\n=YTXT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"944c969d76bc142b8f7dc59656a9557cd75879fd","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.7.4_1677161017573_0.27183900016545426","host":"s3://npm-registry-packages"}},"3.8.0":{"name":"@akord/akord-js","version":"3.8.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.8.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"80a5c0ecb703488edbe73c01f0779ca46b47a8da","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.8.0.tgz","fileCount":85,"integrity":"sha512-IidIZ26GgfKL1d6lOds371YITEL9sUxbUIQqVUKkoQyQDqFKB2KCubFDqtZwPco887XO4oF3SBlftiyKtAspjA==","signatures":[{"sig":"MEYCIQCfd43a24MctVeGB53MeNWTX+aqJWkezw3THltyGzF5pQIhAN+ikvo2hJOok0Nv08QVHAsrqHMeqUFgwjurlhX1Y9Mb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj93lgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqiAg/8DZDXh0dSzN2GUviu5+HN38r3dMOUddCRWbEIUp57D2Vxsebn\r\nikzARTM6GQ3fc5HpMc/zajDU4GLb+pyu4Sc3yjtjif7kidr/UcqBXO+I5EDk\r\nPqMhM+kJPcoEVFZZNa51vA9IeisJnsTp61129KRETZgfypktMY9Xrop7Nl93\r\ns4Yyeey+5Hbr09Zot4JEQNC7SB4PPOT27M1B5DE6TTSkuLn8Epwt6/AvyLYj\r\nnULRS1vtmkS+NY/ahON+r+OMiD7PgodxDw53ruBavO8VbW7o6+3c4SXTxael\r\njz+fXN+QhQy//2J8TOnpkugGSV9A8VxDAygpJgHDCl+TUDSt7WCMPEoTnLHu\r\nsuQcKd3AAhPqhnf6pCWgP7ChKZPsv77ycfbB6Fxus9Mcg70yo9LKhIa7y300\r\nxlBdm917Lpcp8HFEead9X0xHaV9LvbVzIPOIjFOkbH+fh/DlKlH6zEMcSLLe\r\nxYQuOKX/f6w9Sc2Tije2TcGR/KuZip+Prf806FNlCQ59AjEg/ay6rLoznnaw\r\ntzQZCt7EHuktyCE19wG82ChX/gsJwRkr8kqhT15FiVWRa07VOuChKj8aEGKd\r\nMDk2H0Iuz6TaYG+rE+acDWIcn4AIjC6dVie4E/l4GxuDQtA1ISFFu77FWnik\r\npwEmUjtblcfxD8VZ0LlgbGOXLVA8YWPuFuw=\r\n=UwEi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0 <17.0.0"},"gitHead":"53c945039af59ab434a99ef5951070f311426764","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.8.0_1677162848377_0.10065490399702748","host":"s3://npm-registry-packages"}},"3.8.1":{"name":"@akord/akord-js","version":"3.8.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.8.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"43df6fe83e774ef328d869ea8c68e8672b056c61","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.8.1.tgz","fileCount":85,"integrity":"sha512-cXdJxAU91muMf8QHWu40lPVT83dj33TOorAsSeAQMi4JuPJ69/1dCRG1v+YWlmIftg9au6eeG6y10dmx4a2u0g==","signatures":[{"sig":"MEUCIDmeezIEFHE+jEGU0yF9aDmBZ6uak+ArNUDejN0SVoNXAiEAwWg2RNJk49nUUeJpZSTLfne8NZoSGWJIbgYiDkKEZIA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275468,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj936vACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJew/+PHlPVoVCVvNXobfTm2jbhA8HBDsqU9qkYsf9m3igj9pxlxNk\r\nDpRuE+kHGbpM2jONLgXg8j/QK8KQZLRhgNQVdsOps5U8nlVEAn5BuXxeaW3j\r\n8la6iqrtDPhFKNDF7IQgoMclj62c8O4g5yJwAqvnS9nA8w3cgwH4vkuU3Ozx\r\nwy3hTmdvlUSA02bdX6gbu2ue0aRgiqmM1XIfqmJccbDnyZySbhlwfPdtkFFp\r\ngFSiPQXSka+rPCxYFXVF3UXJyXqDAuWy9ej/6SyxFVPnudUxd2GcbaFQInge\r\n6pZc11fWbBo6K2WuhklPb4bM9gOaWhiPakQNtXPMd9xTN17E59JmA+iE5f/j\r\nucaGvFJ8ZKvTfhe3X44gjDMRcFo5DTdCJEeRe0LS6ybt1ER07DNPdEpqTo5U\r\nh1XF7EXKBVrN9wsIvKd3rYmRokHP17WpTJ4Tk5ndziegdqWNyJST8aQpFuUW\r\nhfuvMtEIdIRTmB96wDV7GGQsZvtsPJuvdd6SHc17h2pxyJDQPmToCt5AuCCP\r\nuq4lMmDU4qvi34Jf/OVgt+2F+2TBo7Fcy3BbLh27UW/EP0qw9hxPH9znIjJn\r\nPbPVS0zK3G1uaaiTfGbs3B31LGPQrbfi3GmAUgb9G0MW+WGHFIELroPS9k8N\r\nIKr7TW2DTnn24JkZkOEH2aXq+/bGdKT89K8=\r\n=Ss/2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"03118f5c6ba2eaf0753c689ade16c5b38b8fc22c","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.8.1_1677164207276_0.4335451712262328","host":"s3://npm-registry-packages"}},"3.8.2":{"name":"@akord/akord-js","version":"3.8.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.8.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"7be6b97bde9c9e4e1ba9ca8bcb524dffd5e767d5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.8.2.tgz","fileCount":85,"integrity":"sha512-btp4ZplV4RuQkl06xkv3tPJXywLl8fOWA/mVmKCOOTlCJa9Ty39KsxPZD6u661ZrJSb1OyfobMn9zkEM6CkBmQ==","signatures":[{"sig":"MEYCIQC75FHsldhkriSqe5+OVXHXJfdoJmOUZZB/ztJHP5W0HgIhAP9oH/sERhX71eXbc+jXNJ6S8rcKE5uBDpdN/jxFQBr9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/Kk6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcnRAAnE7k03i+OKCLFWTeC1oOStE84ijx+7D3f76bgib4fQfk3rMq\r\nXp9lFTR093pszqI3V/S7tCSHvVaiQzfxRYpfuqLy/Cvvo9R7rsAc/Q4HckHf\r\nt0T+e2zB/A8O7W3RDVRRqAEr+8Wrr/VJOIF5YK6C1XMpwK7GN07Z64bjCND5\r\n8gAsi01YDeHkFCU3HTS9Ce+bntF1YlRdA1JVXevZ5JH1SrF0YhWSD8FV5ItJ\r\nmlV6zSlrxhjVitjkiNrUSIgzLRT2ZbiPeYUQEyjiD9SEBpQ4lhl7zIt6+xlO\r\n78rhsTdqcT4k25tC9I0/ImkJ9gO8ikHqWemJrrE7qdLh3E41c0HDiCVTJy6f\r\n5AWrys2AHRLtqDIl+XoUBzqwexSGV+GRLUSO9qvOiJgjfw+No49Mp8fGkaeW\r\nMU0JfHyeyiPpl+l035h8W/mXSO2Hn7Apkuf6L75GSHLnBWs+qTD2V/QPbeH7\r\nAHhxkvqrog8lbseFB8Q+2Za2Kz2XZp2hBPDvKHZ0vDct0IcTP1tZynmvh/Ms\r\nlVrxuYIipZs2Xzx8NOaF23QTFxXQO3WbC/AG2uxqTuysYj4gTmq8c7yBVmE8\r\nXi3WZ+MhkeOfgy3K0dU6S/tLYHoTNH0Ot2nbTUIeHgGEpFhfA+DaoVnN6PI2\r\nS1u+DoNitkF/Rco2D/dnX2k626It1yokzFY=\r\n=EH5h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"50658e5e7dd8b1e6523c101d0ec4a2151022f9e1","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.8.2_1677502778406_0.40666211349195414","host":"s3://npm-registry-packages"}},"3.8.3":{"name":"@akord/akord-js","version":"3.8.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.8.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4609cda62e23f0cea12287732ed6d71d54f89c5d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.8.3.tgz","fileCount":85,"integrity":"sha512-25MEMYr0udpVMt4kQr9z5LQ0hL5rvKrDFjbdo4cphltiONyofUGLMVueKRcVreBkS+J7jMmiUdH/+0CLRG1TCw==","signatures":[{"sig":"MEQCIGpqXcFVrRWxtzfcDSMaii6bds/bn5whFJJpw8L/WxRpAiByYXURcqHv5AKqvWC7O0xgHZROp3yvDLQpnhewbFj7/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/OJvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmryGxAAgSkbuMDQFmJQ6ivt24h37n6P3VWqdvWZuYujdHBlknqfgdPZ\r\nUH5kY6GiZ+KM/Fhz2emymtLlmt7DpQQ6RfUJXYe6uKQmQzEpgfdHj+2nRmcn\r\n+2jEFAgtqbk+4MVBcp1FsPK5J4Eps1QvUkfr4Tz7X7NxDqPMOzY/39LYECg2\r\n+7wd3ULV1CNHUSLUL/sG38YiLmMuf/3KkCPKUK0siXGGxWvfGQamXzDuV0Le\r\njfSJx7jikpZWszOp0aBfbnpdq9Bg3vExJ4WxcrnbnloTH5TJUFbgFZxKtZzJ\r\nLS0xzTds6NX0zhiTW3L3wgwh8S3AEurllpRwRF7yq+m5n303r1EOYNwEksta\r\n5k5M4qz9RpaFba/S3B5oqXkHyj6XVJQ6ND11qMJFmEDGs3YAnoqh3nwcJBVy\r\nhmsut8EC/2zwSz8VFpsAwCWhEc6FD1n/VTalQtYwyKbe9PSJFhIZOxwLgGwS\r\nakwOLZR8Hkx2czQaPgn02bDhHCDz4wFp/SFx+hOcqp3xllsnb8dJg3m++DZD\r\nUC5I12ebDO6lubLnFTucRbGv/laACvtUNkhYkr20beKNoOcGmbEpt5XQkplA\r\nvNj0Q18cHHkKRhlIjs9onsPR9x1Te7lH6F7KGsq60ipzTTugJWTl4681icj/\r\nA1GiCPhLvrbMZFHwm8qtl3+JhRG2lssXm+4=\r\n=V2MY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"0fabb85e8111a2458e7f3663245ae5fdc8c49a82","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.8.3_1677517422840_0.021667893038836095","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"@akord/akord-js","version":"4.0.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5391a27fb2c5a3df585baf5636f0204f43c3e17f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0.tgz","fileCount":85,"integrity":"sha512-nErpQbjTJc6l1e6iK4twZhANv3+T8XwH8ptkV2Q1Mm4czyanv0fvX419Ku/1jtC0R98wRw603LTawp22nMCcHQ==","signatures":[{"sig":"MEUCIGWtc6uOIFuhuo0XPBCQoq+dOgCRgGIsdYHmy3dBcfKNAiEA5zNTH88aLftyQv6C301AfxpoiGIRMZ8GZNwcaZSveXQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAUT2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3yQ/+ORNisRt8yLcRQjPulrm2OMWW2LTokFt16l+d3u4KoUtaOQp7\r\ne8ImeYxntLAZQloJcTDmvUPp5Fn9kJvk+87978oqqEIg6C2JDm3ofMkV7a61\r\nqxfU5XC5OniwCEjLuJB4XBZBP1L2BcO78mOpGCZRZnVZeyweEXhAtwZlKX5Y\r\nLf9da6ZrEH2EaYd5NhxMHCf1DhFNxX1MJoRbTTfKZgm3hsqVTYrSd+kSYfVR\r\nxFXjeQfI7FrUBi7PmraV2iwZATHpOQUpCQv9nTlUf/wHgcKtG0b4JCV1e5/s\r\nAfzJb8qnJOjNXmtK1XBPOAPFtCxIDIznMv8UKKzcT/8D6iPUhWAtULq1J5if\r\nVD+S9BwDEEOwr/Opb9Q2ZPZOfdzIdwPlX51ECVcHNXKS6+dHUvZe9yCceUHf\r\nMdIJ/mp5DOGZ6OgR//gYq7IdJibX55wgr7XKCzxc5OW7SNd++2J/WdlF0eGh\r\njojmR2QxdioQQ2Cv5kIbbE8UjtfAzpgyznishU4kwUGfaPQF4RmBmFofysgn\r\nvCMlUo6XmLXVImMhNQqMS1TNkMCJTK71LAeJIIc7qMZaW15OoPuF7amYlvhs\r\nrrftQLvyX8hbfWkYOctloM5m5/gWcYfuMgM6vwSXtz7/dXuBM0ifI8I9zoaU\r\nhxKQnBgfBsst7FmLtTOY2sdn4B26mJ9F1+0=\r\n=MFzW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nimport { Auth } from \"@akord/akord-js\";\nconst { akord, wallet, jwtToken } = await Auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = await Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"ce738c2fb639efa7f2ca0e866170ec9c1c52f30a","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"deprecated":"this version has been deprecated","repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0_1677804790690_0.5662330173084715","host":"s3://npm-registry-packages"}},"3.9.0":{"name":"@akord/akord-js","version":"3.9.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.9.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3dbf4363c42a47b34ab5e7ff4f59000f6ed3d6fd","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.9.0.tgz","fileCount":85,"integrity":"sha512-6a6Bh6OLl3M7uhBx6b6hKTS7Rnttb1zsqoZ34y92CaEgW9s6xNcRVp2VDcPUPkvAJhPRnEok2e5gI/ufJgzv6g==","signatures":[{"sig":"MEUCIAfUX0mMpMAImaEu/uV0G+fYpB9IxDXWfBgsRgIIdTJDAiEA244lJVDf6zMBPZJHO617Dvts31BAVQaSdnkDE7bWxtU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275688,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAUn8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr96w//WMLs+WvREus265TgyZaVSkpv8rXbLoO7X1uPubsBs5DCwSrA\r\nbzYm5nvf8z5fFqsru4IyHEnwPFey2/+E08f8jyNg9UoHmnjQKYZxIZYMuDYm\r\n23xx3u99kI4DWzIwTtgxCWMbxOh+lqHdFs1ZABMLGU6XkUw9I7hZlh3lCm8D\r\n3j+ZVlZIeabGcSgAiYD9FXOqjTx7IQOozWTHS4ibzQ7FsVRkA/Nh2uEgOPeh\r\nelitTzRraDAQq1GVrUwJB7iO6GoR7C1TtYck9VVqf278nDLayY9LI8A8+0ur\r\naAD7EZQ/WVOqTCjUlNo/t8NFxhtG59mF1Pp81pNn2Ni06lxqwGVrprZBp+jz\r\n5/RFNAvF9Bk022zdZAnAA+Y509oBpL8I1kX8dwVT0Bxv2g7VSb441qkWIqss\r\n207rz8frRD+8KWzjOo7Spg40n9rGWqI84MWOm8acab0IaGOhJk6YTPJqbURG\r\nViKJlDWG1rPVEBqyVqiISXqTb/HpXKC0TQu6gTd4SwYnYmdZC/yh7trHXY4T\r\nvy41oNgSQS+cF/1utSDQvt2oaNFtkWifR0Mxg7z/OuevVVqc+xLFwF6jI0lq\r\nqO4noaBcmDR9B9+wRpBumgm62U/Vl9XAiRL7XDbYwDbv/nMiffjGXgNMfs6H\r\n5PsG++uDLn71plTXiUzxIbWAMquomp89tfY=\r\n=mwtx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nimport { Auth } from \"@akord/akord-js\";\nconst { akord, wallet, jwtToken } = await Auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = await Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"ce738c2fb639efa7f2ca0e866170ec9c1c52f30a","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.9.0_1677806076236_0.4908853362828418","host":"s3://npm-registry-packages"}},"3.9.1":{"name":"@akord/akord-js","version":"3.9.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.9.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9e21ca8d3312b71456ebc74545dc732ecf18611d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.9.1.tgz","fileCount":85,"integrity":"sha512-PKawCXoMC+dku8fYwppDpx5NVvszweHXnNvX5vbk2qiLADfWgvwMNQYjKzOOB9XITJwMssavNEqsuMoCi20evA==","signatures":[{"sig":"MEUCIHs7Ik32DyfyfH8rOteDvqC+ADbX/fULFgFMysbd1SO6AiEAjpbuiw5vT8DXsdPkTB8/vlJMsTEBB3QhmyaYocIA0UQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAUvQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr2iQ/6AxYF/8yBm+3XCqDixuPhfr3aVr8Xb9ZFvdDsQt10Oy6mvYa/\r\nRZuyYF/XB3Nltxff5yiPUQFfS0e4geXBKTXruujC6grqTTWHLczsz3k/z4ou\r\n7NTBEXi/hOqxL/tTTfHgpAoe88bclyFsCdvx3roiJN3PuIOHakRCmsb63sh4\r\n7esaI96q6A6RdR/XcmocRS55RjYTNS3SrTIUdrvafply6Uw+K90RXkeytPoA\r\ntI5vUUWkMadaivrr6udpMJPz209zcPkULvy3nDeIgT4v/mYUK7XO7BW8pq5A\r\nJo9d7ofZMhpJ6vvOFJ5cErxhs2kkn1FYHYr+l1DFjmlciF2NdTAiOOoQg2d4\r\nuYWNkzdIu/ZJrXjZU0LySJ8OO2NqJjHoMjHmoh977w/NkixbP/qA6MDweDI6\r\nFu9ThXhbM3jE0UjNM4eeGEm0eGoyzaNWSu9IYJur/HGIWE8Run+m00ceIGMc\r\neenq07cWORpMQxm4ajM/CA9S+tUkP0oD8gaxoqxsvLc7ASs/mLB0NNnlgOkI\r\naa+9zoAH44DCX4g6ynZOLNycpjIrlApUhYJObiJHAIhh2Lr0LPrYyxNGrEyQ\r\nEnK3MvAVRq0WCAa8l7UncLdcsICgqtVerS9+khaTFkj4UQkrfkAsBs41gyxg\r\nbrzwxY1kbOGeeh6vvaykct/YKK7eE5vhNuE=\r\n=dYa4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nimport { Auth } from \"@akord/akord-js\";\nconst { akord, wallet, jwtToken } = await Auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = await Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"ce738c2fb639efa7f2ca0e866170ec9c1c52f30a","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.9.1_1677806544192_0.6018173452246831","host":"s3://npm-registry-packages"}},"3.9.2":{"name":"@akord/akord-js","version":"3.9.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.9.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"fded5df336435c5e53742c37cd28cf5abecf2ba5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.9.2.tgz","fileCount":85,"integrity":"sha512-PqAr3mGSdQ26coODxykCEPW0TgvC5mw1Gp6/nUMYAa7LmBUbfqPLov65hjJYZ9o3WVrGpJ0J1INdaKv0EI+YPw==","signatures":[{"sig":"MEUCIQCOOY/j9PWRrxl4CWLndAHvZtKXnHMAiXO9G+pojxpZuAIgLQgX8bKywkaaUpMff/ixjO+9W0HCE+TAE1pCH2iTgrk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275779,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBxiXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr7Bg/9G3DVRso8gsxFlcqnDRkuqbHKRsl/ldINt3/JNaoJJ4Yvdhdm\r\nT4GFR9rullauhrBHmdO/wBAZZ1cnSUVbaF2QvF16Eu/IwsrYnZAKTyOJj5B7\r\nX2oMoVXgISXbtJUoHwSNoF3Qbcdu5lG+P/j+nP4Vpmx9voo7HAK8ioaEJYKI\r\nVbPjIJP00Pzr7vkjSIHOAK2ztzW8bvoJke/ZZXE4fqSgqVW4qs4fJ6NMxnaE\r\nyHwLC/P7sgIPCXSeGTHDugzhQQfbnNLn1udxW0JFHPXN5o5aY4oqp+nJiseA\r\ncjueOWh2l05W6lrj39FkaPBSLyv5h8Tc2/JsB+YL+QTa4/op6FhlT7Fhv1vk\r\n5YAYcsVOXFCwwr6XYn4xRpR3Du12E7A+B6c2Vz7xYSC7JGswhA8kdX7VgWRu\r\nr9Wq/tkrXTvYnCKW1rYWwJwXXHCvw4hAj6/Wckv5ujDGRzLawZngdoGG35rE\r\nl/jDOOtziYZ8OVbc/VJxUmBJ89Vl/lHsDueklEhwp4M1nQ9KLC5lB3liOU+l\r\nPhVchXowb2eLao2I6nu1sjHJu2XMn29erFCGWGYESddkz5mLSwTc7baLwJ/f\r\n6wzYYSM9VDPdyla4cYpWUEr9Nw6T4pusB3CArISqkGVAnCbQTKPQke15q0P+\r\nNYtWwemC3P8OdLh9OWQxyZUDkMsgIOAF338=\r\n=AHRm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nimport { Auth } from \"@akord/akord-js\";\nconst { akord, wallet, jwtToken } = await Auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = await Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"ce738c2fb639efa7f2ca0e866170ec9c1c52f30a","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.9.2_1678186647241_0.9568207620391376","host":"s3://npm-registry-packages"}},"3.9.3":{"name":"@akord/akord-js","version":"3.9.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.9.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6760e64221fc60f96cf6151ca2266a8c57991f2c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.9.3.tgz","fileCount":85,"integrity":"sha512-aTKdC9jTJn2mcamjzyS6B6efNIZLdBID9Z62/xzeCks58tH3UWyrwtBUWK37b8dwFTNaISUJWNwkJoMFHrXv+g==","signatures":[{"sig":"MEUCIAx9y309jtVEqmIjaO2bBKdMFzjvrls+BGfyfUMXGdVqAiEA27vVMPqQ4K/VbAEHY2KfaPB3iuYNheQvB48G3v5QxOI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkB0YVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpsjw//ZSbMgJrCUXX8NIFo8CSKRD4PkCqNA+pstPCAueMeMuwaVldV\r\n8UlORkbNejlCvqUw9TOiYKsq3vbsSDj9UsCqNuOKr2ODun1gjEGjGpMF9xPY\r\np3FZ3I129nC9QN0KTuA1K2f9m7HbD1STyziddcItgpxZtHrnX0BZM/cUb0yp\r\ndMHtb4dD6rK14huHdgQqJvjXRZJ4RpfoYuS0ESAgaINazCvE2NikF6A21yyr\r\nugGmpJIiPX65x3GkQuHJ3//LL7Tjci0+ip+ySKN6HU8KP0coTmc8nl7iBwCy\r\nE/DCBNpkTV7OGxqcAnyjnr7C9ThRuTVQlA8MseM13h9ib7CGktVwYbk58pZG\r\nTkldnBTM12sd2MUjhBsiTv1FiZ/llCIFE1pqh9ELjtGG7FkWMotdGeQKcewA\r\nyodcjPX5c0UH9q2tipN7IZ1qSGLjBOLDEPHCfg5x0/M8vlqDogTWRx+d39aZ\r\nez/X9sMoE0X/VwDbTNVYfp5D9uvaOphVAomaHCLlyToF0Qeh8Z7IzPtJ4foW\r\n/CSnr1cOg8FmJLjvN85SHZFtd9ot2J8g5mApBmBvPWISL186mC39wXoHgGJS\r\nCz/vYBjOMNZZcWFGx/RbjCP7W35OQC8Em7GLw7PRpE9tdivH2MNpmgRNc7Ky\r\nhK5Q9TdHwgOAfWQa7lKNa0b3G4QwOAudweY=\r\n=3AIb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nimport { Auth } from \"@akord/akord-js\";\nconst { akord, wallet, jwtToken } = await Auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = await Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"ce738c2fb639efa7f2ca0e866170ec9c1c52f30a","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.9.3_1678198292819_0.027918878797116964","host":"s3://npm-registry-packages"}},"3.8.4":{"name":"@akord/akord-js","version":"3.8.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.8.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"8b617d9fdf14a10d3ea39cbefeec8177fae51c54","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.8.4.tgz","fileCount":85,"integrity":"sha512-9slBQ61RhKxvzRfgYTFQApLMi65jFsIHKtosg4WTxQLwQdKSBHwvxsY8ObQgJZy6BHPpuexg83Bl3h6oTrTyWA==","signatures":[{"sig":"MEYCIQCZ9CHiPonBmfHqrqvTSQfbJA4nEZHuBt+0497YcPY0kgIhAN62HjJAaXuP5MSJ+ivgOK/QiNqT2OFKBe+3+mwOmBkZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCJpLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrPLxAAg5Y1GXxYKZGHUXrgwSmcG/uBhQdxh8SRNYuHN4Mv3m3DLeTS\r\napsOmxp5D4dO6fpNGbBdxjDLksX+oIw5C+2ysjU/6bO7QU2FX4cJiYuHECF4\r\nCQroDLFLaTE7Pif5Iy50Iy3rXdzkVZEMA3HAMHckS/Pokwwpkc/kqob6v6Qw\r\nemcyUmRdjfTK0KmfUyiAulQWAwxnoq4uzR8eZZ8lQ2zg1QjI4soa9HRxOw0m\r\nKAePIBAuuYgDwA2NabL8Gvizha9LFQz5TTgfOBRi1GyUnr6w6PGcli2fO5eD\r\nz2ES2QK2hPopGRq7LpjTzXnV9GLVIaGzVdpLZ94VqbcHbJ8hkRQFiC8yLzcL\r\ntydg4Ol639H6heZhIJR/rAqwV3T/eGBZcGtfnX+vtN0m99T/c/AB+Pu+FKQj\r\nqmZYi/WDNRyZGd9GkIKUWMU2LQWOh06MvVuTzcTdtV9cFFFr2UbPJ/QgdHyK\r\ncxqxLn7M2FVRsC2Bro3rhPVgo9wissSHmyqtI+bnJw6oy2/1IBiDsdOUQe03\r\n3PnJzn7M+s9ZL2HVI+pU+gpkJRUzgVxhEVw9KKacwEJl80Up2G2klQGd/byL\r\n/UEvDA/BkHVnt5UqT3U1302lm13sVoDUGKM1V0sfTDacndhCzNFZn8bFZA0c\r\nVk/eC9FO5ZBlkjRrAyRjBMjgdDyV3GyynrE=\r\n=vh+B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"367a0aa367eb54af05b89e63368966a6798323ca","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.9.1","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.8.4_1678285387219_0.43205403412679355","host":"s3://npm-registry-packages"}},"3.10.0":{"name":"@akord/akord-js","version":"3.10.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.10.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5635c86a95912e5e662c493235b2d882c51e5bfe","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.10.0.tgz","fileCount":85,"integrity":"sha512-/l56/kNT09XxAbL70dOv1gKc/HX0BevBQcfN+jTuQJXLmNZpEgIVdPppQn3wLe2JFyG7yOYt822iSj0yD6tcRA==","signatures":[{"sig":"MEUCIGnGOOXHEmOnYIOce5FwifIzgtU0eHLOw182Q3XCuX7nAiEAzYZdafY2W3RPvsqgF9XVyR+gLhDe387qpF/tVX3vo3Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkDeMJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqfeBAAgXXugsVADROsPyXRflKeAmmvMXhxgtq71fXTat2HuE57/Hos\r\n4sz4elA3ZVLi0S0DqmuKT+LnIZRGRyuGJv5GgAAHsk3s1PmXYa0QrD9a0MY2\r\nM5JOvJg9/4s3wsaQyaa4ZHByS4c7OLf70yt8v0LCCF0qnaxHuuG2ixWrlw3b\r\n4Lq2xagh1/E0Zrsk7mJraycbTxYXl8Fb6hNb65H4HNeptMif8B95x3arZ8wG\r\nLzPTjf0KeMo1KvaLBqqUMK/9bW69dArlkEP0gfv8YkbsmtoriYpk0padYKbn\r\npdN+Bn8v0DQwSrjUxqE728ez4tFQuvPAd19idDDvamFlmoVhGfptq922/rV7\r\nqOM+IsUEvedap3an4aTQ+WqhkgEyY4F713+gxQFLzxMZ9kutzXg31faGiRlA\r\nPy/8VIxnGAGohL60f9rWInrmR8VKj896srFVCrvVEOqoZ2y1MZHhx+7bEYKF\r\nVcsOGikmnBevlflHg8JTs6j0xQdq5fOoKzFWgpbeRtVJfiWHIqLgCglObmaY\r\nKJcz6201z3/l5uE5Ab8Frpcr08Ub+AOPo/5zkKSXppbqCnKSUDIUwXDH5mx3\r\nD8rxDCfHb68NlwebKlv4Ugku3vrh3ZHEcV2o6Kh4M9Etg0xbzCTgAlwggBG7\r\nA9InE5IW/jJVuT3Orr3vGn7MyK9RhU71q74=\r\n=ouzm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"1d163d6600e47dadca1b36120896c060b5a1b639","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.10.0_1678631688772_0.286569553972313","host":"s3://npm-registry-packages"}},"3.10.1":{"name":"@akord/akord-js","version":"3.10.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.10.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"80390bc3b2ad0a22783710d393c86e909ae9c34e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.10.1.tgz","fileCount":85,"integrity":"sha512-ChMSmS8Ol+dJzi09Awtf/sRUEfWdU3H0t5Ueb4yWAxR8Hd/m2IbL+awevb75wNSievkUKeasvMDoqaYP9ogDwg==","signatures":[{"sig":"MEUCIQC14coZ5ioXI8dRqAXNNDe6gAY8vLzO7BogC4Yi0uApzwIgU80pZ5w5wB8Ec0Z/ZtWXHJtURvQ8dbXfAJGinqdqYJg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkDe7bACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq9pw/+JGP0nb81IOpeBfe/DlKf5VpFP6OgHRhDZtlsxPa8lY7ayGgF\r\nZnp9cXUF00N+TK6LxhXcdz7X5tl2FNW5fUIWsW/7FT2WMz6HiJhuUIMkhyyU\r\nilO7zOyRQafKiecsxsFbUBdKpHzhvWdXOMdNW9tEUA2CBFuNARTZINaq0xtb\r\nKYij4Lp58DYMW9z/1IfhS7wW/7F+Z8birkbFOPJUZqeWnOh4Ii6TBbn3Ds6e\r\nt8dSG4bOtPJZyrFLQ5E6KCOmC1EqLibiXk6EjEAO7/9uVFDe6uPo6WmeRqnM\r\nqZCtJawlzEgbjf5Asilhy7pxO67F9lYH8tSsAnlJUzzJ/uESdYvD+clC4Oit\r\nJQJYkY1u5s8qBU9UqEQGmVq4tXtdE0deBhszrvbSt4iibo3rKKRGxq3OnOvz\r\nGbgIS7f/C4TXHyF5Po0BrMFfleTU81k1VFAsgmLsBabzyfw09JZtZB15hbRm\r\nJFNC6OOiZ46uqvPBSyLDpUtDWJ2jLJKNUSNkpX2WheXeZd5t2X/cFlRzX0cG\r\nkZqpS57ODU5Acb23FZ5qoCEhlnOonOU1mp2FZxApX2MSrViU+3qtK/NtDqwK\r\nKaNHIx9uiJuKa0BE1ysUTcFNieQwKXKWFTiDvAkMTb+L4u0WqvUqBqrH3Kyy\r\nfM/gvjpQq8cCk4bleZeRO1rGQ4nP2cmxSsg=\r\n=6KCw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"71ba7f02085c60405638f92bfa2c8d6c7d2b29bd","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.10.1_1678634714815_0.6966961610697635","host":"s3://npm-registry-packages"}},"3.11.0":{"name":"@akord/akord-js","version":"3.11.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.11.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"23cea2dee552b53074377f3cb07bcd33cbe55b0f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.11.0.tgz","fileCount":85,"integrity":"sha512-aR+BOcOp5fEhIDLAUmkv1GtRxzbdy/E1D5iZOrx10SUIeCYg6k1Aqjr1TBHQEU3RUBKEYaYgSGJA1mMWYSqFyw==","signatures":[{"sig":"MEYCIQCE02Ta4Lj1cmkZcEsgxpVujkZgSfAMU4CDaH4vTGEqeAIhAIgG7TKgzGm9QXIqPeKsuvYoTrQbgXR+W8bLtkFHDybv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkDyZpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqu6Q/9FvArjR/0eBDuazCSwi14HqxRVGApWRy+mQn8nvtlISBO10a/\r\njv5SIaimu3AWELjMDlOio58tJYTSZRcmd1iQGjqPQyrG2b9pEt8OhGorcBaM\r\nAfh7p9pjdhWfWTC6ewlCITDFBf/9KlH5LYhji2Y7skieCGm2mYsXUhDGaXfu\r\nKhzDGO5liuQp91NB5lhvlftUSM6NBCBUcX53thEKuJ0IpIv54rYqhPz4utRm\r\nh1RwJIhPKblHzSZ6eIlY7XcIFBmRgaVcEchLMdBAWV79XCBwNsRtBEChAbLr\r\nhhTKdiWki3RhhPbnrUvFZvfHCqRzhbLq1SpDtPG/9PSRBGa9lOXkXkN2E2f5\r\n76WJ5reOD+zpTcSoOLaiBjvWfZnfEWMbD/6kTq9f+UygvSI1WsTZ4ZZnWOXG\r\nhzW4rc33feR3tJK1fBaJWfGNy+UvRflqZKeWXx/F+mpGPLUwzPDORoLozZ4l\r\nn4XPxhSY5GZ5ZqHUyFFWEvjAb5LGAQZtBIhKJfCad/Xe8H60w0I+v2XZqn18\r\nc/P1eKpCic7q9JNrftlLEQa9DwbuHzScFAwwMr3swMq5DKdIszXZd4YDiYN+\r\n97z2EtO8nQl11Lzd1T+3hkwqqZ2KQanYhgH+aGl66DGUz5fdE+woaKTC9C0K\r\n3ywWDc31lt2DGNphyrLTTYO5AL2CP7i0xL8=\r\n=UXKC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"50b157f18c1bd72c3a03c0dc5b91830f93d4f490","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.11.0_1678714473479_0.5963494169768018","host":"s3://npm-registry-packages"}},"4.0.0-beta.0":{"name":"@akord/akord-js","version":"4.0.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"672cc788c3ef1f55a16bed2e539c61306af70bd4","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.0.tgz","fileCount":83,"integrity":"sha512-D1Lft3sWwPtqjNgsXEwM8VqNgn9CrpiAZ2ZKRLmUsejJ9o9U8b+IFmQW0xrfyFCdAM9TpHeRsGrvIC8Q8qCddw==","signatures":[{"sig":"MEUCIEpmlYH/PYN1CgYPh0U58mXJxHGbfjJ+trP2irJsFDgUAiEAvS4nrvuk17PNMHsDB9IW7asP6VrlUE0GnZe3lycuLzM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":264343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFLozACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/JQ//bheexJluCu2ndLUz/kZVti1+Nhe5WfhRxJxPNJoLVOKa4vJ4\r\nD+8jR/uXYAqn+I+ODH4uOCScRych6tRqPuwlr/CcR5VwKI2FNWxWbvSJvJRt\r\nTSv6pUCqivZZp9n93o04b9ic9vnzy6+M5TSRzc8S1VArHF28m0Ph6amp4C22\r\nVAZP3i0WLq7ylk12ECCNskQFHAKpZqIR32aG08uf8kSLIvtjwNyyOAWggyAO\r\nZsJ22wG5aP3gpaU4M0t0tyITWxNW8/sWlRr3OLdD37NiOvEtfJ7LdTjLt8L1\r\noEt4r/MrPEX5RI7RVuZvwUKHGsUiOknYMx+FANjr1FloBh4IibZjlsT8lYI4\r\nvXqfdlQS9WBFd+e48nzD0JHoUapV0kXTeEhhTTjNEPgZXJkm9PsiZ8Yin/Mt\r\nfTzN+O9V+Zzusyfw5lshatKTuSlCf82LWAHg0HR1nUBpJ2u6GsYoSo5roy7R\r\nZskCCV2V9X61FsokctEz1cv/co4zhtxUSU1VxXtjBhFvW1ESKKAKnyQ0w28m\r\nU/BhmNSW/cC9gbd5qbr+W1A0jmXnWVALOwOLwe5eB7mL47YMfhAI6lPRIepD\r\nm6ioJXy9tZYFTouAeqnIKW/7l0YH6x5hISY6DYDzw9KaKP9D0F9bTOPpd6lP\r\nt9dvXwz/DnrvaVdTtQlHlYLPKqSZXH0BMWM=\r\n=leHf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nimport { Auth } from \"@akord/akord-js\";\nconst { akord, wallet, jwtToken } = await Auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = await Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"a2db800d1cb6e6e2560c5d442208f06e389061ed","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.1.9","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.0_1679079986966_0.5024469314985311","host":"s3://npm-registry-packages"}},"4.0.0-beta.1":{"name":"@akord/akord-js","version":"4.0.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"49f59b479fdf6b5f054fe09fea2ae57c9491ca79","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.1.tgz","fileCount":83,"integrity":"sha512-je9cSI17Iw+54STyyWNlHCX5po5NzxQicGmU5ScGs0pCI7/XLJvuqhNJkRpJfANB88bYFsl9o9gcFs8uxzEebQ==","signatures":[{"sig":"MEYCIQC5Ig72CRCKMYrTqooeLgWjFiOP+ioFkg5ERKqarK+VgAIhANmlhS/Etjm15+KYqdS/irJyHaQpzR6PTI+neJx1Nq7H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":264512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFjbYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqI1g/6AoghLXHA05DRj9kbpzrx0LamOcpwgtHQWZBLfOtdSXB66Z5u\r\n91HZOdClU+ruBU/uJjhOFP1DjVTseYsRFA8y7hAW3P2dJkeESQXrXiNMHNzm\r\nEmu02gUjGmpmMEWkT55LFN3mgfDMoCgnnxLklPpJzVcIoEy4uJ+1F7qbuoaM\r\n9L4r14278B6/gG6fsvQXiupgf7EsO3o7srJFmY3W9Iq81HxVZNDV2FVDxt9j\r\nX/1SenswMyL3zSIAYq7u7Hlb94vE9sw2X13fn9fmoBy25AG0kxPY3DvfEnci\r\nc2PZVT6z1Yr2yzMhm4IW0/TQk3wGKNN0SgV9QMwPJ4Lv2cOFHFqA/6IceUPW\r\nfFc/5hvVJDe8Vy/xbuuYTa2jkpGvB19hBeVHAd8ycIGBc44w7Dp1SFCk9cD3\r\njhOZyynoUE81A4am22+oaaetQmztwsUwZdzUtqFg9Chow3bTVGFQtIsSbxmP\r\nqGe8V5xW2mcP9qmGoeuREozWh0KqI/zgN7/GsBkmapm1O+YkIJXgwPYz47Bv\r\n5GvsyqSGYpS0anO+LsthTnjSnYDAcHFasRN4BA7a6GsvNo+MNtC3FKRTPEhH\r\nXdnd0OnMS2UxMbabT8YoYDjYzljNMb95daZxnzfc/MO6IxMkeiuEJM44nTMM\r\nB5xO5uOTSL9w/UOZ+bfemy9W43YRiqH3zsU=\r\n=o2e7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nimport { Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### with API key\n```js\nAuth.init({\n  apiKey: \"your_api_key\"\n})\nconst akord = await Akord.init(wallet);\n```\n##### with your auth token\n```js\nAuth.init({\n  authToken: \"your_auth_token\"\n})\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"107496c9f3c229d368c12285d02630582286bef7","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.1.13","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.1_1679177432537_0.1653603495603344","host":"s3://npm-registry-packages"}},"4.0.0-beta.2":{"name":"@akord/akord-js","version":"4.0.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"0abcb536b6b8e1cff0a3b5801b2770a8aba4831b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.2.tgz","fileCount":83,"integrity":"sha512-tBA6AlfP5GdPrjyefRxaI/IxHHZE5Ze4eCBzSLHra0zv6hk2J8HdDAAv/r8On7TI0VtazEdFebif41Nh+KdYPg==","signatures":[{"sig":"MEUCIGLZVQH7vbTBR0dm7NZPzPu8IerutGpenEw1ugmz4lgrAiEA8//2pACLLsXTrD3R1eeudEQji5Hrt0SjTjlDrgv4yMI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":264625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGK0WACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYpRAAhX8aZ7DNhEItXsZ3B3x+PICJb4uOPOH+Yn9uA+xveyE8g8P1\r\nbL5Hdj7epWv0jj5zXP3KXIG06IZ1hnZo9gRu6BZGZAf3Jvn6dRca7AAVbEMt\r\nvOBXCN+F7r0pHOl4qC1Tdoc/ze7u/dIixfM6OsmxgGXKsP8gLN3yc+beteJF\r\nLygn0Olvg+Xvn3TNUI8rV7w7hjrF/NiG6ejMsn9ZxAQ9rL1Wg3A1pi0TdKtd\r\nnmnwBEf5NGYZEScGpJYqe8N+SZDpm5U9z5jN9xqUoxrOoxWaFW60pwX3qXEE\r\nQyv1+x84u0p8BjyabXwzTWIC2oD0BfBcz5CrvPvSK2KVizRWWrGE/2zKPfUZ\r\n1LhxC+FVN4XRic7XgrSdIPTvK9l0neHOkkzBJvHBJjmYvvKZfpI3rkVJEo8R\r\nDE10rrBZzUkMHqRhV2C4tVRhfTeBGvifa4UjRlJHSH8nIr60a+O5cESl9lPe\r\n6c2YxemHPssFAm9s+ZWrK8amUtd8tv1uR8Yd/VZf63RTaC+/QkKt+FLtwgQj\r\n/fioYkRh38EF56DnKEPwvASy897+jeSdXPoTnYhPl1w3Yf8YtLZ8wYvaJ/8C\r\nLjOtIBhckL54aoUMBoPrQfToYo2ukNV7gERWGKzXwhS63Qo+SpInjFAwPqjg\r\nZMcFHg9/los5SgXEkDNDsMWYTR6a+FERIdE=\r\n=8hvH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nimport { Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### with API key\n```js\nconst { wallet } = Auth.init({\n  apiKey: \"your_api_key\",\n  backupPhrase: \"your_backup_phrase\"\n})\nconst akord = await Akord.init(wallet);\n```\n##### with your auth token\n```js\nconst { wallet } = Auth.init({\n  authToken: \"your_auth_token\",\n  backupPhrase: \"your_backup_phrase\"\n})\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"749f1d12c395eb8acead6c43f1e9e6b5acc3e971","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.2.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.2_1679338774571_0.721606260084888","host":"s3://npm-registry-packages"}},"4.0.0-beta.3":{"name":"@akord/akord-js","version":"4.0.0-beta.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ff5c64362fb1773abc32636e44f4c0ab32012d2c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.3.tgz","fileCount":83,"integrity":"sha512-MyCxcKed1aLf/xwN7yoR79j2JBu3Z1/6zPlsijJ2+lxjEpkLCWaIt4jTZ0CWgA5MBE0hVKBIgYXPqEQFjMgTTg==","signatures":[{"sig":"MEUCIQC6I1WjGnimsg9kbwSk6Wbn2rFPIHXzKIa5EULNe38jCwIgMURQ6KCEhmQV//Gju9ZmjE+lchZa76GhNJwMM8a3JjI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":264625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGV+9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpxqw/9GqPOr5tNajlI9rQZBZGIVdoZyrxjqy9tFvW3MbQQNnABlYnf\r\npE5yKvDZQYWW4NmdXFskGwBm/7tn7+PVry78K2uRQ8etVbFco19gcYpLQcZE\r\n2sudqYuY2lTSYejNJe2e/B2SknT5bQ0l3VzFevwkA0kcUNxkq1s1WbScloHN\r\nWBa80dfih1khADTir0AYQaWlKZCHPbyXdzgY+xwKbSwi1Gqit+EUNq8z8NZH\r\n8Wlx7dox//FP9PNnSwqUzswLUGA552us1nRu66RpYRZKvv9lDkt47f8au3st\r\nEQ2f6Ulet4MDtsODJUN6hDJeGCGJVjFmkTSKVgsh/t5brtdhDvgTt7OdUHko\r\nRsTgstuQLJwTrxo7pZtqreOF16Ti4FifO/nuSaBjjOHJqlkwplw31PbtbG5d\r\nYNN+hOfMBDxPusVYzBL+WVFCZm+iVfZObHxOzsWe1WhKwWH/Hka0c1TWI690\r\nt18T0r+m3Pfi+0XLaxn1tjMmXIvKJ89+eEQTW99AQqwyfQZTJb98o9HcJD4y\r\nZB1Kqn5W9QBU38o3WugP3jlFYr/bWtmSgh5w4TnzIrQl125HNZq9tHuXvODz\r\nD8wNxyoXgnMmQx/IaK2Rfhp9vb7SGXb8hSB2r4juu52pXqd98IDsXEs2WfzY\r\nTAXYvqlSjwSHRYV0HRs1R+OWkDPpZ847k4s=\r\n=j8Vx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nimport { Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### with API key\n```js\nconst { wallet } = Auth.init({\n  apiKey: \"your_api_key\",\n  backupPhrase: \"your_backup_phrase\"\n})\nconst akord = await Akord.init(wallet);\n```\n##### with your auth token\n```js\nconst { wallet } = Auth.init({\n  authToken: \"your_auth_token\",\n  backupPhrase: \"your_backup_phrase\"\n})\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"749f1d12c395eb8acead6c43f1e9e6b5acc3e971","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.2.1","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.3_1679384509054_0.6276822736009171","host":"s3://npm-registry-packages"}},"4.0.0-beta.4":{"name":"@akord/akord-js","version":"4.0.0-beta.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f29f213ef3b2ad47d0feec999f394f1a04bf710a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.4.tgz","fileCount":83,"integrity":"sha512-6ubTOyAa6jFQY2OTr/00tJB4ErWMyk84XfbImJwI772s+yqFoGJ/0F/wPj/AFi1V27OUqB6SiND7xxPNKkjMig==","signatures":[{"sig":"MEUCIQDZmrcTqtTmQFD9BBuYw0TAXWRajR0F3/gvnoZ80ABLSgIgeo3C2eW1iA/hxvAor4SxaAWtMZi2WSCgfhJO39DXyPM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGh9KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZxw/7B6zL1n4xdaDQ8+p166aHHXn29Hop7C4GXrbpTKUM4RkRy0bB\r\n/QXLRx3RvwRQCpdXcH3umMq/l0vYF1DuDnrNluai0dIoahkrBPGjQYIQKBVf\r\nrj1kaGVcR9Br06YAUQS23gVdHuTGKPqGv/dURdgHfMm7e2BB0OfK0+7CZfa3\r\ndkneZUzPjUHK2/Afvpf05KdWg2K63uIrk5PpXAadbRWazKSZ7leG9aiKyWNo\r\nzmxbsmBPfhtjan6p8KXHxo3JdVYaM1YkBuIEXYSO25yOia2TsGvTWwX3rO76\r\naweKRC/QXe+u0VJ+T+rMfBcke4iMzWeBQYHXRBPx4gtJfx8mVdmah2ezMTtG\r\nr7xsNQ2g6oKSVwl+8/UnKyfF9Kk7tNouB4TCElxD64WulInsFeeqAFYeO68n\r\njMkh7rkdQIrxXX663taW2f0u+QeM7Z/XpND5yQ4VEyeo0AGp70/cjT+zRFAz\r\n9Oa10+Kfzmgw+Z49JlOzpWzL7UyJLZeMERvwpBRQbuOU7wTB7+b79vGWk1ar\r\nQRXBhUJwYsRbwFhFtllZ/jeHn4134nlOuFjIqEyR6aTi/qXdhiZ4KkT56qfO\r\nuRzParNbLeBbDU7yBUEc5a4B2uoLCrJr25TOekckJDN+65ZcG5PkPdFypFT8\r\nywDmcxist1K7UhceX1nFe7WFYAT+nBq701k=\r\n=yyvB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### use short living token with refresh\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ storage: window.sessionStorage }) //optionally - configure tokens store\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use API key\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ apiKey: \"api_key\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ authToken: \"auth_token\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.init()\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.init({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.init({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"10453686713756ef446331ab48b17444b36072f0","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.4_1679433546403_0.27115984482709155","host":"s3://npm-registry-packages"}},"3.11.1":{"name":"@akord/akord-js","version":"3.11.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.11.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"81bc2f9477fca5fa5ff49f6ecc8f42c4d4572fd8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.11.1.tgz","fileCount":85,"integrity":"sha512-egHW4j7JT3+XvwxRrA2K4KC8RvlDHoHf9+BsX9z9NA1K+POtIePTrI1H0Tq3h4NxPFRsmeyfmdcVKYFEf4/Blg==","signatures":[{"sig":"MEYCIQCxV38/rbKcVA5sl1+9OmEphX9DUsQBBRMMtZ8D9AWxiQIhAN+xiBEf2eGaZtIG83BEbudJuvjtAuqtTBtkCgMCY6eJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278404,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGt2wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqqiRAAhqsJypqI2bHydPBpxrrXgVWFyVC8jn7CT94hRskrjJ7wGQpE\r\nLkAuteabRrnJXQdDuBOSPutoDC+lLT+umPVEN+WecZYgC0x3Dwuq0wNnRmAy\r\nLf8F4EO1iYZ5TdxYXJJ4UX3+ym7g80RBoXoQni0qMGrq+wZdfx0oH9w/qhju\r\nsUZXNKME7kxylvZF6Ri6YIJRw76DnjrR5EjSsWTsnxx6ejgdePlXI+ama/U4\r\na6CbC6VbI0pNUXT42ddo7uNpmdMIXgaExDHFXhH3wDqthANHvuUz0ALBadjB\r\nt4QQl+fj2B+x+bV5PiamB5v0YAoHLcNOOSqlLC3Z1VKiTgz8uZM0FocPWEtu\r\nbXGGSYF/DPY/erZEk+LN9+bACaCiLTRw6HXFlNzjn1I8VgfWIvOq8eTZH54E\r\nH11/UAJhy9P3UdAkyro15p0dmFwwW2S2CAjPMk4eVd5GvhbeIE7FRMq6GH0M\r\nEj0rR5bx56gtF8pq66k5STVdnfNjMLqKs1E2kSUeeoymKXtiYwcDcZuxvzo0\r\nn77cXmxXDTr3iTm2HMTSmg/hlTbfYTNDpi66dKSgew4QIveEBqg4mBekSem6\r\nIQWuDJFyZg7W2EkEp0TKUJCqWovG/nLugJ0JizxSVivCJaGnNDIypxBnFvYu\r\niijblsVGoZZDYZhxBNJeRvIW6HY0ywNEnPc=\r\n=ULGp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"2acd7b5bb4ae0b396412a6b93688bb4590a63478","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.11.1_1679482288378_0.40750163376720083","host":"s3://npm-registry-packages"}},"4.0.0-beta.5":{"name":"@akord/akord-js","version":"4.0.0-beta.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.5","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5e30bad06290df3409536bebc26751247eec8f07","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.5.tgz","fileCount":83,"integrity":"sha512-ob6TjWpIRu9H/ZdydakH+0r4XezQsUpqPe0OAxCik5QvWq7Kb9ZjcnTSaGdatb83aAk339RTW22rR/UUixHwyg==","signatures":[{"sig":"MEYCIQDM0kWikh2iSZ9ITlXOsxK6Fi7k/7UpERoppwWq6MasUwIhAJ5zDUeqMNQiZ1UmzYPe6gpGOV76z1OjyjObPqpnZ9J4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":266155,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkG3FoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWCA//YYN6NQ9wh0RH2zmrwCzxUETKyzsAtGJigHOYrw9AjsXOh+t6\r\nxfkr2glqAOD5r89+ewQhaB5BVtnfZQvJ7Tz2WXmepCUB3EtDRPFx0FMmmuB6\r\nV2fdu76LnSJrPFKUGqS6E01kgfSJtAfEifOhZJZE2RqXW4fhk1qYqhPHgloQ\r\nSXitMOmd9KPcBG1187rEKTLzEVvXrFIEf8Fdj4GprzBIa9R9oYSrXeo+Xfcm\r\n7+BiukuGquTI9P/JtSoxYHPz577dI43Qml9ET7mjyjslhbz0w0vipdn9KYRA\r\nzel7sobiUOyHZiyke99jlXGGNdfBQWmDqFf4/gAi4AZU6yfr5FEehtqG3P0p\r\nsChAkGIVHpGeiBy5HoThKiFEO256fFz84OjQX2EfWPJdH4y8tBMhH/4Kf/te\r\naIsKLPsfHjLFFcZeRHBL72Qtc4mofp6/RuzAOtn5+3PWfjSycZNKVL8jiSVY\r\nTcOBjJsZol/O3Uf59hey6WX1SQ/OesLrLzgCoP5zHEIAzIjkPRmSgMReJn3L\r\nFuudpbn16wyxVoOqWxevCwBLtCLSW2XZ3gExx5/FWr2CcAiVpnZYjv6yvOur\r\nWqIIs4ZPJ7hWnh131/zCbis6Kbv4eunIxLSKLU1mZM/k64DMRqCJbzGPt/8C\r\n61DEMf69aqDWYSRCEYu4n7PtbTPsC/OjiYE=\r\n=QVha\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### use short living token with refresh\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ storage: window.sessionStorage }) //optionally - configure tokens store\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use API key\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ apiKey: \"api_key\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ authToken: \"auth_token\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.init()\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.init({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.init({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"f3166041c63b297921f1141df47db5e71709a482","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.3.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.5_1679520104230_0.14989795202974565","host":"s3://npm-registry-packages"}},"4.0.0-beta.6":{"name":"@akord/akord-js","version":"4.0.0-beta.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.6","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"822f66306750b5f846169fca00665e0b9cc22744","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.6.tgz","fileCount":83,"integrity":"sha512-WMcyyoZIOyM8o89FtB/n+K94w3YJWS+9Z4vKCmemcMoQFROj2zVMCXd+Mug+1b6gi1fKxvQtpkMwVEU3/V5NUQ==","signatures":[{"sig":"MEUCICClD0ukO1uHNXR0zeydQOkvy+mhBVxHwA5LpF6lQ3LkAiEA3CyWNAvt2KZYrUkRoz2uh/doFtqbXpYvlqz5Cm7zG7o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":266155,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkG4kmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq5vw//V3L5EUoOmlxc3bfKOYtguFYWH49jT/yOH6r1lodCN+Q24j7+\r\n3PzmyaTz8XJuDg58xRAIjgxSLVzgpPWKgj57OZOeYrte7p1UC2Qc3v2NN8ob\r\nkVgxF4DIGQj/bqpQTC1tRdzRzD0SIxEvT4FZxwoR64X/6pZFRJ3nq5RD7+vb\r\nsdDly3ojKilJ5DZLX0CTZ83jrxkUz4kOI4zmFICiuCZg6shkap0qletM7hNF\r\n+PKolQBoJ4mlT/fQgoIxd0Mvd5a64psiuKP4tqF1dR4tn8VwdULZdlBjXvMB\r\n6rOYwFlDpCoWSEM9QrsaRcnjTMWuDd4jwnxUMKANETm9GGyxVvAwJq7RBT8o\r\nASf7//+fW930Bah9ttUvd4OHG+/HZjz8whUZ+nridPqZvZVFjzZ12PbspTx8\r\nKeNR6yvTzEm84FFvOb1yu4ZSskZAuZS45xQbHNtTVCO2dwqXtWNU5Q2iDtno\r\nYvojRS4uIHES3eRK7IgflEd37DtGPrmBVwJ1V9xiiCt9MxIyti0Tjmk7Hegg\r\nd40MAhFNpP/cpy1s9mvGhxeybnvh5NfTtPBq4zyndaq6ny0juJANR8hEX0uA\r\nawScbMlNLLrNOYGXLnm3yTpL4LIeE/uIAFZ6mvs8qzKECXczwRGnQf3zmNTe\r\nG1zABXSQ6DTKxgnzRLQDt4dhhil2an68+dA=\r\n=k2cQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### use short living token with refresh\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ storage: window.sessionStorage }) //optionally - configure tokens store\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use API key\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ apiKey: \"api_key\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ authToken: \"auth_token\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.init()\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.init({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.init({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"f3166041c63b297921f1141df47db5e71709a482","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.3.1","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.6_1679526181790_0.20418712366268954","host":"s3://npm-registry-packages"}},"4.0.0-beta.7":{"name":"@akord/akord-js","version":"4.0.0-beta.7","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.7","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f2ef69dbd6e8c6b239fd67853c553447dddd24e1","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.7.tgz","fileCount":83,"integrity":"sha512-rxggE8i4F8tehMHdekS8mRgZB35WO+ZM5a9HxGJsVMlTEk3LgHcQhAHgtVYvKINvU4QfDlcmUp2LqhQjoVU7DA==","signatures":[{"sig":"MEYCIQCBgC7MJX5DcDsmpSse6m3/Egn5yJ5PcfVzwGs08cNqiAIhAOpKsHanyELTxWg8jQhDn3VYdKPCfAf3EoWGGc85DBwQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":266155,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkG5IRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrUdA//fVNPoSR0tvdBj8yGngqrW97SUi9Qgnb5ARk/2JMqAu3qBPTp\r\n5gGWXR/2VexNe3RPM6fmp/oeY8q+Avh11jJ+fSqDbA12Wfhwb4ifUH40movJ\r\nCr29zgqUEzAVXYyUyFqy+W0cJVYUZ7VITzbG3M8wgi3bwpESRQliYW0BB4n1\r\niTt1/Hmbxd748LJ1m9/CrWLna5e1Lz34mMaOTPzr5u/0cYKsvWz/9rwehMAS\r\nMbggHZXE+Y7rK9DcFANpKEzSggutCW9I2WBmmFzVA2mXWCpNjtHST6OrJzpE\r\n15N9nVS3c5NRvEnlGaY39l88r4gmQ0HTbxyaH1jtMr8pDvWUP/ssqb7X29Yk\r\n7lfBLxT3Tvr9nYgWA5VxjdGTbJYr1CDSmCPrxlCPYKF4hLjLeYj63Nl+1Bjt\r\nKb3Uos/pA9CUAUCWdtFzpg42TF0T89H/aZV7BoLoyjA6y1WXmecdE+RA8Z+b\r\nTxybZDMolCAoo7mCTNXzPfzQI2oTDRC1l1nP9nnLjEEnRCLmuLPlWNDOWG2/\r\npUVTd4M1eB2N4ZLhaeWF9aOIOqCK3JHDsFKHv3xwkJiX9sXjfPGIHvoM7ess\r\neoxU/rUst6+NsAJgeXU46eBDoEILXaITEzQs2ni6xkHRRsRO83/o736JgdB9\r\npr8GAw+Fmmh+8aoapIWAAxMyNgLxawSGqSY=\r\n=0BUm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### use short living token with refresh\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ storage: window.sessionStorage }) //optionally - configure tokens store\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use API key\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ apiKey: \"api_key\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ authToken: \"auth_token\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.init()\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.init({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.init({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"f3166041c63b297921f1141df47db5e71709a482","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.3.2","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.7_1679528465247_0.7642315189720708","host":"s3://npm-registry-packages"}},"4.0.0-beta.8":{"name":"@akord/akord-js","version":"4.0.0-beta.8","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.8","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"357fa72176e149284fcf6829907f63b53a066e58","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.8.tgz","fileCount":83,"integrity":"sha512-ULLiuSrzwaTg8a9SP2J8IlA17AdjzfFIrXTIHB3rZkonA1bd4zmMvgEpwttJy7SthdjAPKvbdJrHnMD6qq6rlg==","signatures":[{"sig":"MEUCIQCdnUMV+aCs+3jHm8MeU+evOt8Rx3/V2Dvvka0AVS/6UQIgOy8ujlDau8MKOEyTqyh45xWmoFORfi08qilHFJ8gdzE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":266155,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkG5WcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqbrg//R2LrvE5f7QnlkC7LHq/DmoRtkWp4Iv1crFN20uaPLv0VyQ3P\r\n5HSmLzEPySo39+TLmNpDURLHTFCtcph/Qmw4BpdtrxP+xF+m4w9gq58W1XqB\r\n+hMcoNOZQFI9w1jOAoGgiM/aZNY8SlV19OFuOf84Zwy6KBBxGKLfjNetSveg\r\nGK2y3za3FX73wifX4wRtdThYRjLPABefm/k27Et846AeHIQd8ZNGmJd+22gH\r\nQmAD08bZCD5babDJ7CAA2Hvep3XXvmRryTsGhjoCovL31YAim1BB3J0tozfa\r\njKzIwogUGUUHTekpDFAkFdYs2/cjanBNj1HJ3LG4jjsKbOusa3MN4dcHTqss\r\nqBRItl+5HbGoS7n2y3ski2wReRufO68/y0u0imq8kIgg3IPaSXHsIthqnZ58\r\nKHGLYRE3zhBCdjm7KW6SYiymNTZxQbRbGdkMqJ0B2kppvzkwPWHKfwM2XdGt\r\nnjbAxODr/WYm/3oW4P8/8alfH8wKT+XdOYD406JFNdEJGk2CPByPBLXyeAp0\r\njK1812THCV0uBsL0BI1djH6U2tMpkEcPGL3uil6nodXj7oZ+ANd+bTVQP3z0\r\no8uJZZNehxxX6DbTCgZLvGNTIag6OqaDxZ6e/n0GZ0+u0aufl6JgDES01HlU\r\n2cAh8sIVDgpwBLfONjp/99UMt85bFcesShg=\r\n=o2Hq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### use short living token with refresh\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ storage: window.sessionStorage }) //optionally - configure tokens store\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use API key\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ apiKey: \"api_key\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ authToken: \"auth_token\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.init()\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.init({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.init({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"f3166041c63b297921f1141df47db5e71709a482","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.3.3","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.8_1679529372510_0.0009440356999301791","host":"s3://npm-registry-packages"}},"4.0.0-beta.9":{"name":"@akord/akord-js","version":"4.0.0-beta.9","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.9","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d67a8f006a6b81583661139265b133f7bf94aad8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.9.tgz","fileCount":83,"integrity":"sha512-ggpNkL+tMS9b421dFDTE3Z1J6iHP5G2+O0K59lQVWZH14RY7wUV+ljuA4sBBOtjayBGQwBBRIEwTCDhweCalmA==","signatures":[{"sig":"MEQCIHtnyuW1dqgP8KxITmzz3GBm45PM3NZ1nxZ8EEOH2B9QAiB0ISA8Nneuly/5yIglI0aiyt8e45+Ku/aCMx39c9lgVw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":266155,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHFwYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpIFg//aoUWAB46bJ+hasMUMToGEqUGxoFvDUYiBuL4sm4vQuyUfRcG\r\n1xxxbBgMOJu5FZVCrCZCZVXFBKkicT593o7it8hr71xEPgLvydg/hjrXxlbz\r\n8Uw5jvJiFDByUAulEyibm9V8j5wEvWyvM6vJTAkBK2mMz6eM6kKIiiVtR4T3\r\nwF/0C/SHsg+81vKDd23jFqEtbbN32ZFsBa5Cn8E72i9BEbJxpYTYK9yuyiB9\r\nvPyJIVclq4q0FbaYKG+EaHoCz/UjdYxZbr2+F15QvwkStjsamuPikIlqhLKf\r\ndLxy/ToIHU+9Wn09WMy2FLCu8gIlmIAq4BJMrTMERgSjXdDJ36vdBgkk7Gu2\r\n6ck4wEzU/J8k1174m6C83Amm1Ou+jdkCQQpRzDwmmcM2+0/Zb3BaBLJ5x2eF\r\n5bMEFiwH4PJb3jgkdVe007VPTUJdt4+yTYhYC6tZB5BvJg2Lzc167lMYgauH\r\nVKkpVokIcuocYjHBVFFlI77SHRi1vfzTyjCCi3igV3WGtScG6lB0vf9FA5dR\r\n+OpAGMOdUjKKPrYAT80VETuNLPy24PFvmze7yU3d4zIZTOJq7fAYpvlKlCX7\r\nJcU7L8iLQc8+5QB6N6Z8zR1axraYkLGXgx5MJAa1nv1qK6MqGasMoi8vBnxY\r\n3F/rXU2hPvttlhtMOPs09Ld49kuZX8HWIK4=\r\n=Mwx5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### use short living token with refresh\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ storage: window.sessionStorage }) //optionally - configure tokens store\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use API key\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ apiKey: \"api_key\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ authToken: \"auth_token\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.init()\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.init({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.init({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"f3166041c63b297921f1141df47db5e71709a482","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.4.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.9_1679580184244_0.519049999887349","host":"s3://npm-registry-packages"}},"4.0.0-beta.10":{"name":"@akord/akord-js","version":"4.0.0-beta.10","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.10","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a1529d5e22895f47ecc6440a70334f2fe8ae6238","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.10.tgz","fileCount":83,"integrity":"sha512-nGejOJ/ms1sNmDD+eG9lHO6vthdYwVSaji0kCBA2jaaIfsTQtsF3i/LmcK8xALVaaVjyze3NMBXtuyhX0SkHNg==","signatures":[{"sig":"MEYCIQCpIr+kNi92j+JQHCuH5Csc8cf+vw9jAYDoL9noZO5u6AIhALJCVp+ZXfxRi1JknyIYYvvAYU27CrgUSVq+DOFUJXQA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":270515,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHdxbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpHfxAAnBxPk8+P4eqaLWsiemSY6W9sAS+8JcQ2+5VbYOo5lk9WQKje\r\nPHyKGtEuWv8ni67uTTIyS5cJuQchl4eBh5/QpqjOMltO0a13ON9wIXcMR31F\r\n3GZ+Mu3gE2YCZaAM8NcuY0Yut2VMbhhuxiYEq+DFl//I73l9ERUKQnz9JLIj\r\n8HXJmk0mxmh1nvE+9Cvj4SgjUY/u7+jisvFIKCwlQ0k4G3IsO/3omRoHvv1i\r\nz8tAIVFv1uS5tSl+xhK+Q/jV+7PEX0ZDSuUSd9g5nd5IDzf+T0mf3+zcyk2z\r\nUP5grl69FqRFBca8IUBfw6KqoCUAJnxLoDipPjP6vyumjOhzUjfZeQ/8ZFOc\r\nOPbxWLjVdlMCMvLIbHMLw/1jFI+e8t7IHcIiL+IELHyQJ4IrOK775ptgMYHe\r\nak38Q0SF58K/6dmjMebU2Kb5+VbRpZ/gevB7olTZPGjxilsP7ri74QgKaCbA\r\nKyoCbt+AIA51QXg7cHlyUbjJnzBWEN9XleiLZy+H9csnT42XkD35chzT6WUT\r\nMjJconjg4eLWroR1HcUs2arblCd/sZHyalSutcel/wYjEGm839eHX/Psc5bD\r\n24F9re3/L0ZZuJLtUSrTMRBjrJ0eqaokZLnx26zdESI3wZIltMtTLW+16rSx\r\nC9T3fCcnOLW/mCKlc2jdHKs+kQ3BTl6w1fQ=\r\n=/XHh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### use short living token with refresh\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ storage: window.sessionStorage }) //optionally - configure tokens store\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use API key\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ apiKey: \"api_key\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ authToken: \"auth_token\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.init()\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.init({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.init({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"0ee47edd2202b6557e5d3a3a2e5822471bd7ad71","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.5.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.10_1679678555140_0.2481893204187653","host":"s3://npm-registry-packages"}},"3.11.1-beta.0":{"name":"@akord/akord-js","version":"3.11.1-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.11.1-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"899736d911b6aa01ecde8eb733d7b78a47040a94","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.11.1-beta.0.tgz","fileCount":85,"integrity":"sha512-L/Vs5LWyEj0ULaWNnFPt06CjTuf66AI7y29ue1IUB01Q7EvrHIQ/lchSvTGSWueGIqz1sY5DMWS4IoZH+VPkqg==","signatures":[{"sig":"MEUCIQD/YRA6d00PmcGT8ad8ViFAmjy4fkUrXjEvwzA/qTVEsAIgTXZDWLY0VDIn1Bq6fmk4WluFSYRA0jKwda+B7hLmMxs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHw9CACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhDw/9HJWhcZ4kk8/vOshbnRBRNbSKLhZYRgBcGA2pa5jNbZeyEEvl\r\npQgsypy/tqcYh7uRO7Ddc8D/vra79sX6zdc4mT2QuDT0/JVGjQLOrigk5nXU\r\nbY3l7BFxc9y/D1ETRHOC1Gwsj/UX8ybBnKUeHiLOcgac0FZc9axN8KuH9guy\r\n0P5udryLKET9yGMuJbYJtXt2lA6qO53x/n3PjGfT8cau4beGNC28rexuUagI\r\nxuMADmKYw0cXjHcIuD20LYiLFkjnvMgd4r4saRcoe/DQT/AOZaeyiQd8IYqf\r\nblRFnbCZtN/B77W8lvet4hQ8192zExb7nfhjjOHpeXf+hdeOIrLyRlnYHCoc\r\nJKOR6qsNXcpDgwqsPgc1AU/Bs4GTnqFtfAD55LZXBqZF8VVual1awHT1kkET\r\nMHOIQ602rrrs05w8MX6XAt78re9po4GRjLLQmeWLW6Rf7zR8YDm4uahUXNX0\r\nh0hiEsQZIW0pwCqlj+MqUC9IYVSmcNJ5ahC1OD6V0rDijYpLZ65y7qNq6tQG\r\nV+tIPoSJXUcSm2p5JFYE7s1kaZYPxguLEUs5ddsvXyeVgMMe+kRmGx/cG+5v\r\nQaabdJXkbeDgtaLKmA1I2HUVnAb0SVRHJtkGwbQAyWsBSr7fL2kdKkBUGcta\r\nyKv+Xo7ejQ/N7G4Ages/lWZx//lsVy36Qs4=\r\n=5ze9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### with email & password\n```js\nconst { akord, wallet, jwtToken } = await Akord.auth.signIn(email, password);\n```\n##### with Akord Wallet & JWT\n```js\nconst akord = await Akord.init(wallet, jwtToken);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.list();\n```\n\n### Examples\nSee our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault.\\\nWe also have some example flows in our [tests](src/__tests__) repository.\n\n## Modules\n\n### auth\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ akord, wallet, jwtToken }>` - Promise with Akord Client instance, JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { akord, wallet, jwtToken } = await Akord.auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst wallet = await Akord.auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Akord.auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.list();\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"2acd7b5bb4ae0b396412a6b93688bb4590a63478","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.11.1-beta.0_1679757121895_0.8552650487563573","host":"s3://npm-registry-packages"}},"4.0.0-beta.11":{"name":"@akord/akord-js","version":"4.0.0-beta.11","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.11","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1f4580b334a3a9d3bddadaf61f2892da82be8580","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.11.tgz","fileCount":83,"integrity":"sha512-XYoXXw+7NtZPm6kUbNsXVK8NmNcjCzouPF66jK7tVpBjv1gixIUHdnF88sGVPqxvSTQw9uvfwRB9KaLeF0EQCQ==","signatures":[{"sig":"MEYCIQD1vsFdt4Kv+TJtAgNSHil/SCYUfSk4rl7PhCpJvxQpEwIhAJcWUSgGlEx7hP2ftRsdifemzJwDC9KR8Y23omuiRsHr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":270538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHyg1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqLjBAAmHiNm65Jr7Fbuy58sNV4XpOli/bx3Uvs2MXNdKqmKzdz37/9\r\ntPlSykNxmE3z8gVG1inwW7w48ch/f7EgVezkNwKfHqACBmAw5UqM1oYVZeec\r\nulFiairkLF5KaR/QcJnwrvyI274dg6MY5dUWJOPb/Ys3NHvfTHLJpi5x0BSa\r\nTuGpNmgEoiiOY/8K91f4iJ61Jd75PDvDklVIwG79qwxPypsbaPq3zBt6RJ9N\r\nize5xJzajwFVxpyaDRjYuP9+0UTWuC1QmNQ6OGZ8SRgpzzPWafxTIbjfLJ7i\r\n8H/0cF8Pq23KBIBMZhRY+rINDzSZlZ033U70euEE+LzL1Jy14JFDQivBu86k\r\n0wnI7PL31Ix9aSgMwUnGCGu9zq8e0xxlFPfvKmtZ2B8sN/VE1voJsSxjN4+j\r\nJqDtuxh5DzVZfjUoNMyApUvg2zD5hZwYkO/lP8W9npJfsih4EDhbFP7bIWJ5\r\nZrMBhi6UBj+NmXqYSKfnVCk+K4psZPzx5mxNmF8RfNQY4ktpWXysNMdpy+hU\r\nzDwEKDg+6uBHPdQqnRHuVVzZUCmPUdYxtkJWOP97b/cqGZFW4AY1wn0NpxKu\r\nUKuNFOVf/SmQRJEAyrsYU1NH5nBoz5X/7GUS8pvPeYioRazj6SpETTs2WSVP\r\nBEy7w+MRx/AWoo6myJG44VZr6xylTghDtEg=\r\n=PmnQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### use short living token with refresh\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ storage: window.sessionStorage }) //optionally - configure tokens store\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use API key\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ apiKey: \"api_key\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ authToken: \"auth_token\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.init()\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.init({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.init({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"0ee47edd2202b6557e5d3a3a2e5822471bd7ad71","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.5.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.11_1679763509641_0.07003205374589982","host":"s3://npm-registry-packages"}},"4.0.0-beta.12":{"name":"@akord/akord-js","version":"4.0.0-beta.12","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.12","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6058450ab7e9ad02b67cc1e88e8cb12d418c5ccf","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.12.tgz","fileCount":83,"integrity":"sha512-RHVjIQ4Q6P8gz2p/x0dUYhGR3/30MNkUuP7rNJamovCs2yiKZEz48Wfh4A9aCIYeq9d8eeOhHZhoOvGAgvJX5Q==","signatures":[{"sig":"MEQCIEgMJ85b44jFCo/Aw53uEYidNXMgIvEspL446yZk5wVdAiBF4aAIJrcUbO7DF3x9n0ljT/+zVu68VuiL1hxDd8oMMw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":270538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIHblACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrqWA/+K3pROVN4DdlySMhwbWRvgdX/AbEcdcZ4Vy4ZssXzhIYb43ln\r\n02yHywJ9EA5RbFv24JflpXzLKVoCXjkVJviITHLWFFmI3vnEhzeoszgbAWWY\r\no5WiUY7yTgVH4QAfbrhMZ/czmAGobweKIH0buqARDonAs0oXU/dd1JEd+B3X\r\nT7EUfA1N44uTuifGgKrd6RIGVJ6AXL6GQDsNUPON529MA0VQ3orvXFXYWEzP\r\ns315xPwR5wWC2lFWk9uWHP9wJTJgqW8/MB0szYUzddzH6ftsgnGcTg/tfnyI\r\nsH5pJKCdY7pwseGbxnbzAHbV5iMuwoHVR/ESfpyWGgttuGroe6cNWbyiZOG1\r\nNo3ri2iJUc5tMMeOqFulbMEcpxpPYlUbCCb0jZPB94oyKV8LmMA5EwrxVRkA\r\nR2QkUc7nngKiNnSgyryD2EI9ZFXLXrhTalePYK8H0ZrCCjhZdWjrw29zOMd3\r\nO/QNdnmIL+8wFJ/BeewJ3O3zyuRR2SX1qhbx1NFZzS5sWsV2X/UTTpzZUT4T\r\nfD1LdLrrpl7k89TlMH/LeOm7qO/BmwMgHtvuavWXpx5iGv0HUQfLG/WfS8WW\r\nXKSIohnZiW48k3/mcEstZswwvT0yBAp/8RjlWJayINUbCMiNQKC2QPK+Om3e\r\n4nLFsuXoTprcuqhDZgUldKlOUAHUeY6kz90=\r\n=EMNk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### use short living token with refresh\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ storage: window.sessionStorage }) //optionally - configure tokens store\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use API key\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ apiKey: \"api_key\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ authToken: \"auth_token\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.init()\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.init({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.init({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"678ac18a705fff87e5962aeb9b23d4be53711f48","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.6.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.12_1679849189414_0.7903843095104162","host":"s3://npm-registry-packages"}},"3.11.2":{"name":"@akord/akord-js","version":"3.11.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.11.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"0a473d3da98e71281540a1defbca7b9758c2f61a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.11.2.tgz","fileCount":85,"integrity":"sha512-9leupq5b1oSMWO3FuUlSRz7KDYQbN7Qu/PazbP6YcWFcYbkokw7Atd1jyZPILzIejFfWKJ7ej4WFVpUw9SWQVA==","signatures":[{"sig":"MEUCIEyzFZod48POj5tlH4xMUQpq+jLY2FVaDITKlETDsa7vAiEAjLT5vbwyIpI+GWd1hi0OeOPUC8wqrq2kbyEs0IJa6h8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":279002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIZpoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrODg//U12gtU2AGx9y4O8cDWu1KQxMwtRHHbrOhE/4/nXTCdn81aq+\r\nup4rqKtRV1EDSRTxLR4dTIhtTUHP8Iv8uWdgQXOh8T+C888N7GoHtfg1ShA2\r\n/Vb2rQ3vmh6mYl7hAFdYRGS+LrOhCjcehFEmvzvL2DnT8grk/Txd7fE4CRo2\r\ngwCTliNxCN4Kc4GOCBvWRtwJU84yKFSRsf8yddsU1SDa+flWSdm+9t6xy3ek\r\nFJH1U9wuZc8l6uCY+SEfJ2WwlhcPcRsEgCVI3rcnf/dAjBSJnnrupEFC40q4\r\nb/Mam5NfVHAxrx7N7e/gNyq8PIKrjarjYJKLvD/9f0edQtwLry6YpWwRTJ/h\r\nrRw/ZHrn+piXNfns20sEbQTx1FaxTFFqMtKw1hAB6hpZ5yAzLijz9b7JobAG\r\nMBSZsbni5vQMv2smOSw129BIEQ6Pj8CVR08422h3q3hdzwvJnE5gNnuapBlv\r\nWSfVrWnevkKeKdrTLei8lZ36K6reb3twIQ3BosIv08lOQ0cWX0UggwRtWpcu\r\nOxnyJUksPFlYQriiYPSSIpzurSoTm0XP5bxXZu5VNMSlL1uev0LaoGS33dAv\r\npAsgjanaSsJROusB02+D4K9uIbIO6NqM7TKmyZuvMddYSDNDwF6icOcdRWjb\r\nD0Md68rpd/KnmpR+zAy26ANKkS+2Xgnt9jU=\r\n=7y27\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"bfa34e9e4dc0a5285791ea3c20f2aefc8cc5fe67","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.11.2_1679923815753_0.5484615019067614","host":"s3://npm-registry-packages"}},"3.11.3":{"name":"@akord/akord-js","version":"3.11.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.11.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9dc143d1daa6ed2dd83c9683e73d2cafbe16d0fd","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.11.3.tgz","fileCount":85,"integrity":"sha512-y/HY7u9pMtWZjSInF5eDmlz2J0gvUShh/TGhlaeXNpUFWv3pE4fmbDXaIP4I6BiHjL/ZiaYo9uWMB/9/DRmFRA==","signatures":[{"sig":"MEYCIQCf2RrTNoHjxkF4EHjc/KMRRRIsCqU4GLKKeU3xsACrzwIhAMNkgaE88Tlh5xpau+nKxfx/oOYcGTM3Kb9wtmYUWk/G","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":279026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJBdYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWeQ/+PDFMRtZmdo60Vp/5nCMQjJzEqI/YYTSUFiBKIAxPXjGLnkfQ\r\n0SVXTE3ib7ebJorIQDgXrr4KLaZ9CciGyrV1WRIYXPUANPQIJbYNHINK4dP6\r\n62HErKSO9iOTZE+IaOSDeKd3wsszf1r+ElGQfiYOPJmDSWM73VeLxZK+otLb\r\nHLdmXnlPm4lwjtIc3KNCMznDl87DMG4TwbzgcUSdvEx+eo/XHAlRAGVrQmmv\r\nhPFuy85zATLv6UuUC/xeHceQnXL7c2ZWEgcQl3yj/MCfTYu29U6Dfxll5t9u\r\nd3eBvMjCWsVpmoDqqavrLHG/SCvHhWw7Y6WBMaHQVMCScCMF6wIrLpAbkpA3\r\nHOBT6TWDvPPh9v4GzVM0mIuqDAZ7YMBwEkpxiQoPzoXcKedEi7oxjDsO8aXE\r\nFXPxdlNq17vGDII/IXI1mKm61aliQmxhHhTfa03eaZjydF5eAFTetcJnI6xf\r\ni9MjKNdXyJXL+VWnwXh6jjLve+92+DS4SB1EhklrImIMn/56r232/7S8r6WO\r\nIHEKJWAWUo4+Mfsl0AbgFrJSGCXnJqEOOoyFuaUC5KQ54uKiqdyL4UL1HCJi\r\nqttuviwq1x0W2i2zTj4icq3jxpj+NpNbaHVe5ZOs4EohQMHl8kRU9K+nTIET\r\nvoLfvQiONetDOivHrGJXpYiJUqtoyhC28L4=\r\n=v27y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"88f72f845eea3dcfa58bc6edce7030c905403d99","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.19.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.11.3_1680086872210_0.3889697093002893","host":"s3://npm-registry-packages"}},"4.0.0-beta.13":{"name":"@akord/akord-js","version":"4.0.0-beta.13","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.13","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1c1a336bd8d20dd57c183ea107474fb42b07b85e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.13.tgz","fileCount":99,"integrity":"sha512-k3JdY2azwBNuKu3DbSC66k0MdsPLdPFBqUplqbhl48IoKKwNyrZdahTdjgumGiiV/glmrMdhifDXHaNalvloxQ==","signatures":[{"sig":"MEYCIQCdm+mg37ft0L8D3nvr8fxgsQ5bAxFUlQkgpmOAlDha/AIhAIVAhjsBRFII648GkgkRT5FPRQveLx9kzMdGExRIMOno","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJahXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnfQ//T7naS6AMN0lPz/VRG/S8F+0beSoafp2KNcpn8rRJ3pMUGtPp\r\nQvcUvoljRQwclGG04wkHH1rBqyw28z1Ijbesaeq+ng37wR9D7IWCo187d8kQ\r\ni28D5nXsKuYoa3cbR/ziCJO+jf+q6kJOcqh86+HPReSQimGhXv7OzlIOvBZ1\r\nlE47Ld0Ug1bQZkkNGQiuwq9i/TFFBUAck0LnRzLVMCQK+URX3FFksummBcEl\r\nPivhIkxwXms2oXaLd6qZWAq+05rs82KlAecGE2LCHIHNlSK/pkW0abRZPWAj\r\nMRLP3FVO1qsWYAwexAtD38voBxyRDdDrTyD8/PQPUreID0EK6/BqTB0unk2F\r\nBOic4g/2zp/2X89s4t4cN5ckAW5fcdfVwTF4ZHYLk7P22yEnlaIvYi3B5lkk\r\nqLEJaPlAAvpXfLa6UEd8fwhX/1q77ThWAWGARxSC7FaBL2a5g31SZfY+M1to\r\niJtgwmy5wH7SMANvrqnvT6S7pMGMGSLZlMEP2vi7hMlJ4KjEhG4XfLRqmkfG\r\n8R/joLdBNbeFiKWmKY7rEuFoEEjbR52KQYWIBUpLNQ1qnOkx9Pak/XNa2fCv\r\n2jnM/poHFNrsmhaBK7v1SjhRQDt83BRtikuzf0Buvzxb/nk6c+0y/6d25kxd\r\np+oNI57uZHWhHDIOcvZyLWrqpMVQvD8tEik=\r\n=ZeVZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### use short living token with refresh\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ storage: window.sessionStorage }) //optionally - configure tokens store\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use API key\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ apiKey: \"api_key\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ authToken: \"auth_token\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.init()\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.init({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.init({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"bc03f7a583a1a0338ff234d752dd8ee64a530d35","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.11.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.13_1680189526904_0.896988613033898","host":"s3://npm-registry-packages"}},"4.0.0-beta.14":{"name":"@akord/akord-js","version":"4.0.0-beta.14","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.14","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"0c1eef8303b29cf05b5e0d2f5cda8de41f32d0c3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.14.tgz","fileCount":99,"integrity":"sha512-d7u57PG+UjKDC59hcLmq8hiIzzKUCgYnC4ueErqekPdJ1yDbpfcTLJkzlGvWIBoDRfeQEZo5ZJ6tIw6VQY5Jag==","signatures":[{"sig":"MEQCIDxOWjbXuZg7akwzefl5UAjpPaS24LaMDAj2jXftHq8tAiB3uZ116g4+GR7YywR4PY80yM/bvT9l/pA2TszwjB4v3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJyUGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrs4g/9F9M8SjRgQb+dGtt6A+3ZzUTULM+R0tTbSEA+jtiQW++IYPyQ\r\n2t/cr2diJ1j+eky6tzUHR4EOW1p84E0fxfS/Du7E8IfjROqLIqBfgELXcAIB\r\nCvUbaP5Qvgs7vmSbS6ojADA+WK0Nw2NiPQs4h+bLNPRCncX3+7u7WeztfnvN\r\nyjVIpLzFUO1mJFyJGaYGUFblVx+FSgwDpbwO29gOi7aKoDMmgR+VBlahYD5z\r\niIIYMbEH/FvH6o8t3IKjMUns5dgiIzC4yGA4Iq68TxdCXHgS0YcvdZ87gT7+\r\n0LS70kA0KHYugubZrDkYFfKdwdRIsh+DfzUKJOAJ+TRsmuGr06adA7u19zq4\r\nw0kkFBRdyzQLyS/agQWDeLN+B3yxh97LJjbUc4QiY+jjXedI8mAZu5sZi7HT\r\nQA6jDmDeOGc4MSuQNQTE/Xf9JJkwJwT/4s9r+kd5j6+pdfIuKMbrRaykNrol\r\nqGyoHgvzAF5X6GKAywc0P5AIv22jEgYICLzSOprKz13meTdLnZJNssn7OOXg\r\n2cE2aYmbj8xCfP+v734F9soEO0WRWLT6NktmWtKAZQd94+4dpGE6N0EUPBjS\r\n3N+TwGOY46MWCyw8Kpg5NlSKt9HrqscIZJeYo0/WrEr3eZyTiS7jYcYrKo15\r\nzfWYi51KXLtsTPFsHpPFI+5xgGRKRg0rT84=\r\n=LoIj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### use short living token with refresh\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ storage: window.sessionStorage }) //optionally - configure tokens store\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use API key\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ apiKey: \"api_key\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ authToken: \"auth_token\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.init()\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.init({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.init({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"bc03f7a583a1a0338ff234d752dd8ee64a530d35","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.15.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.14_1680286982549_0.04245629133076134","host":"s3://npm-registry-packages"}},"4.0.0-beta.15":{"name":"@akord/akord-js","version":"4.0.0-beta.15","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.15","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d6f25ae79be4e5d9c52d30ef19eca3aaabb5ebfb","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.15.tgz","fileCount":99,"integrity":"sha512-MXJIjWninlpRURyUWYvvbiKxC64gWLSxMM/4/WzIS/+f8elqRKf9aernnO172YxQIcZWkaBsitH0PopskXjUCw==","signatures":[{"sig":"MEUCIQDgkk+K5uzhSkTk8aZsQte9XFSRKctecgZkEh53KtE5HgIgNhttNG3rRO0l6ahYBeqwnGGYD0/Sqly7FA6idV8RFx8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJzVeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqufA//QxYZsdsdkkRmaFDOkQpUUzCQ+O4udOhiv4ZnoyPhCRVV/iMv\r\nlxqpUyFfgIoENklMmacZKY1V0iQhl8T21Yk9SVy8306aRJT7wV90qvAHJHuN\r\nVpExtaErgOEaRDUId2tyTqUr5MtPvngYb+19nRf6BrAxiZvZx/GeAHfwdMD3\r\ntQhx4k/v/4ZecpLkjaowJGsBM+MUjqsufPIDyIEz2+7Xiq63r2kdxvAmliKx\r\nHkmQCL8+EPul+AVk1B5pahd55Bf1IhJCABLmT19tw4T9ZqHKmXJBYcWjRWge\r\nXo0rVLi+IHJJjibZyWRrpZipKBl4QnsyvpSx2gghmjXdR8AlIT6PCI3PT9xw\r\n78t/smKjsLWK1W+nEMSH8PI8j3fjmW200iCMRdlGDHR6LgVx8JWS6h9c8MWP\r\n7tKHQM3FSx6r0UqPygq5HKkaF3mo8EPxpDkDRrxwPR7jKzBKZck/+c0E5b8x\r\nu7x6gBrtJkYXGNgk/W9ixAmndo4WHWgedZpAfMsBZ3G7JETKqrrU8ujwHarU\r\niISGGGmYBHK7ZP+ocFzCROFm2PdqRTDdTuSJswhUK4RX0usTOqDlnvmny3o+\r\nLjAU2w+W2i+gYaDuaUOLuJqqiHwIiZ9YZAc7NQjmfzh/DPoNdW9w1aL317+q\r\n+ai2gQrtWBw23E+tFpGTWDBVC9NEsm/vRg0=\r\n=skKk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"c371db2642d8091709e9815ab579bbde34277da4","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.15.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.15_1680291166288_0.5938753408941915","host":"s3://npm-registry-packages"}},"4.0.0-beta.16":{"name":"@akord/akord-js","version":"4.0.0-beta.16","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.16","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"65aa86949bfd074ee71de99cfc95ba4aa153c385","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.16.tgz","fileCount":99,"integrity":"sha512-A4wV5gNqSKSv35MT1Xhd6eRY2aec1QTEJa98L+2MELPtWJSEFOaU6DzBgv+oQPUIuy3gNN9vZhdfLPJaFs00bg==","signatures":[{"sig":"MEYCIQDSHSkl2CRcZ1K+5H3veQ6R4V/UpeJl1QkUQmRHMmSizwIhALgAAxJ/B4CNyV4IjPxUoqKexKS6EQqK0yxqddxWpfN2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKYpSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoaPA/6AwRkymMPvHw9qUnmN0rl6LK9+n6QvYH3IzzKN52x5IE8Z56t\r\nTIX3J8lpOGX6TRyzQ31dYRhjf5SBDbLyy4TOP/+tLJeQ1Zzq1+tawRV0e9T7\r\ng1oWqEC+UV0qPQhyU0ylQNEy3rdJxEywRTmXlrK1c6QNZra8VALUc/siZWut\r\nigr+e8uC2sv/7m7FZiQMRhaZk2AGc67Hy6Ua02A3jTIzvstgH1+kJjBdZgWK\r\nhWoT77wFotqYEVMpTGUsnWuY6Dz3cc/d2R+6bDiMd+6youTwHbOBG15NEFTJ\r\nnJD4m0/q1MMHZV0iRYVVxH7QAif1cJYzLSZ2lGpiHclMe1magJbCOSxkRiHA\r\nVWbdPH9qUizqOyVJYiiaQgDQlI2kOAWr3YpVTpdvYGuOa8b0fs9aQUMgnXkO\r\n61xfV52/OBafc9hDszV4iW40MRIAtI2DhqHUG8wVFR1pOFUghmBXoEju/EiV\r\nEiuyb+Gyblx4KbLwZ5Kl7eY/v/uJzJ5nP/Q3sHorYG8mf3Km+b860lpv4SmS\r\nFM7UTTyakIo7VdPsEk2HPPswB8+BBQMAthnJ29JtmTkEPeiXveeJPX9uNxcI\r\nXx4MLdn/ay/jT0jPBSLp88tdDz9nf/kw9KssxQrCQ+5RarjYqKs0HnrilKYC\r\nPVaY9MTzAFPOKj9TAL+qAYNxtJ1gzGnqnzc=\r\n=yi87\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#auth)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n##### use short living token with refresh\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ storage: window.sessionStorage }) //optionally - configure tokens store\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use API key\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ apiKey: \"api_key\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nAuth.init({ authToken: \"auth_token\" })\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.init()\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.init({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.init({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"c371db2642d8091709e9815ab579bbde34277da4","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.15.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.16_1680443986145_0.3805925774822305","host":"s3://npm-registry-packages"}},"4.0.0-beta.17":{"name":"@akord/akord-js","version":"4.0.0-beta.17","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.17","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"be0235994ae6933c05660c9cb19fa8bb996c49c3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.17.tgz","fileCount":99,"integrity":"sha512-QZoftl5Dpm0Ud6zRL2VbJ74cJLnhKS2wkK4Cmq4fbWBMll81N8eB7f9E9mPVIphPpFke2CgKCAg/w0jlwrSzxw==","signatures":[{"sig":"MEQCIB7XG9VOtcX2EsSc2UojF9sDRcZBqfGVFr34Dq7KopfEAiAMYmEyj7cihqDWjxDT5il159que0nPz09KLd/IG8vNRw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkK9zdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpUug/+PBQuwqr44V8ulWGQaiyPT1tSXTtG4h1fH8dsnF38tQ42944x\r\nIprLXhWg3ezZCTmBKRGoC4nb/cFK5bfg5WqqDVCWeV0eIr9wRlCeXqKfSEEH\r\nCDe+JhXesjxh349glY+SLsqG+QFL6B3QWySw2mK+oppjOwj+8N6vCsU6z0mj\r\n19xP+cwZ7dQHrwQ/QE5Y8K1cFX8UkaRSuCN64lk2r1eTjFQiGRYmLB1BOKla\r\nDHDElnT8T/U+KEuLPUprRIJ3Xh3LAg6ueUw/+omt+ZjzkmtrnRT9DFhC3yMZ\r\nINJiyzmSMtskmfivUFO5IBeQmkjQj6NADjospnEbiBkoa3kq3jmNzONRW0rb\r\n1O/qjNs3oHcq3F985VZaU17q647ccM9w518zYQ//EKosQ/QiuF8kVQyZ+eKv\r\n6zlvk+jpbKMYNPqb343RePs6mtPzV4wPiFUw9WkBXIuPqCgNkk4havMXg2iV\r\njnFsccdAvykmUiiAwMwk+bbkBh7LPOhUmmUD01KpqisGEURHhYC/Wm1W3DZg\r\nonEhICO49VvuAJvb+JoodLt4ldkXMy9zuKBDDtRD5j1UKH8ZZZK3Gyh8XPoy\r\nZnRm8tNcWiye2+zrU6Uefyw63nyWABN2e3pY7bGnSZfEn21fWr7erh25Vc0n\r\nlN7mh0PzkuNWcAuAL0dBM5ZNF8+VnkkZSLE=\r\n=K/DP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"3c8b25ec6d97bf8f5a060e71acffef2dd22be18d","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","@akord/akord-auth":"0.17.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.17_1680596189190_0.5342190258612365","host":"s3://npm-registry-packages"}},"4.0.0-beta.18":{"name":"@akord/akord-js","version":"4.0.0-beta.18","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.18","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"facbdfc03bcda88c4a38c98c9f3fb029e8c82eaf","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.18.tgz","fileCount":99,"integrity":"sha512-QqbSA7Mt7W2g7xzW5qsSPXnvXJdKG5mkxSj+Isu3M8NMTJtK+dB4xnEINHe6pOln8fL3fROr6wO89fg2iaqzyQ==","signatures":[{"sig":"MEQCIC/k/DP19FChIQ34DkhAbSqFQASxOnPWZBlJqZvgKOSIAiBDEpAj3ujHELUUOOZtwZaZdiVeU5qQAkC4B5u1qma0Aw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkLsCnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqU6A/8DTKb0FDoCgBnZyswWHHts7QXi0EHo7unQbb0o7ChXA+OhrHz\r\nyzOg5fQUh5fQbkt5YTEOTP9FIs8s1iviy7gxa9UwWJvbc02cECUPT0VAAiQE\r\nPgq87u6iPjkyCN6aHgkokylKIrI+wxV3/3fzP9RTCfct7KsNEdFXfNIOL+W3\r\nKy09Rw5fypI7JjFkYmJhVPpg0kWC4y9kZCgko1zxwvfh0B4wwrMt4XNbrZNL\r\nyYUl1kr0hjHY1Aab+ltMC6QX1ek28kKuuaFjPmf6+6/nhqQC4a34uR5rmmgW\r\nQyLTcLu31o1Epm5MFUcKZIC7X7ImrCUsfa310+zrpVeQv+mX/FAtiperYEAJ\r\nAjiaSYp5mbBuEDsWlZG5H78L2z1QNGnfvu61pJiJHBpYkqi8C4Pp7nrbSnnu\r\nPFMSDn6KFFVKgiu/Gn5rCIco2wgppZQ7hMy3k49BLNBObeQNhuOvTIcPmlXJ\r\nlVhvP5IQQyZfqXbZ0PA2v2/pfTjAOLbIQUKt/GjNf1Q1g65wpogEKaRqEmRT\r\n/ujqKLNlzdXJdlfPMVsDTjoR3vi8b/4t0jWXYcNOo8w1H1N9V1stLJoFly4+\r\n717z7Io3G6jEjvMc2iXT5LGdg8eubPJCEZrocOKT2JN4mcZl0mqG21dxOmcU\r\nY/Xa/sNXkVFR1qutLOfEK/hkymKIfrivHOA=\r\n=ZX5A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"84c27d4e899620f02006b5a9a4a03464075e4abe","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.2","@akord/akord-auth":"0.18.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.18_1680785575499_0.3425979226018405","host":"s3://npm-registry-packages"}},"4.0.0-beta.19":{"name":"@akord/akord-js","version":"4.0.0-beta.19","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.19","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"70abeb135eabc8b6e1d398ae9640bdff0b437e10","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.19.tgz","fileCount":99,"integrity":"sha512-WZ2wlLO15F/i3SUD8g+bccT5g1UKwv8I3SERef1XTHFVBIOhdhcv5HcD+g12eZMNc5UmVHfZmAgrHKgH+vEcAQ==","signatures":[{"sig":"MEUCIQC62JLK+EGJTYOfvQ6NWUbzL4jJMvHOAAD252aW9FAOjQIgTSKGmRx8gOvehx3Pjo//rVI0Hfo1B1jt7pZCUPIXP68=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkLt4IACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqB+Q//WZiwY3RPn3Q8XsXo2n0ZZnJjeKNCrTW8fNw9f6PyIpJspbL7\r\nEGiPFXKQV15JG68dSbPuYL5cjze7sShKpUgySnL50dYJ7MbCTOf0j3XP4qER\r\nVbtr0H6TlYQtDBEae4VPLEy4HhW0JB8TN24ja/AtLtGj8TxYqbSq7LTCthxV\r\n/sEIpI01KDvZd/y9KtXt38aXKAIaE5ZA8snlZVbgKHH5eCH1jL1e//6wUVf3\r\nPaBKgK7Bet5BMWw3qS9UFim0j68HorIVPzk+4dPVKmIVwhtp/VFP33vi2bmF\r\nPa3CXW1t0vddlMh27YXFPMJVICtFfQQyc+R0TYrHAO+CHTzfyuWKf1BXj/PA\r\nPJYFbJnd2CadybeBqesKnoEg99PpjQ3Wa6OldzXJ1utSgba+uNBiosuP7jzP\r\nLzeBBhVXMaCXaOdkuY+jgRg+ndqkujNLyoTX0YRI5W7yijwcnP3NCFby1D7f\r\nAyhCeXcd1m1mmmuE7jscquPkYp0aTzxAAM4tMfsP6wHOZWM7v+WzZiWjjFx8\r\nukUAqPpJ3lfNf8JJY44srhTE3AXVfzu19i0RWaitR/Z0gMJBfIaCFwCIY9tL\r\nby66drRMSmxaEu9VdZOuYZ6vpB/ziGZwirCU5rh8+RL1yCv1pe3hZfG1QkUL\r\nu075ZuVejqbnXsxguh40oBQOKNS4DE8oVeY=\r\n=Q/y/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"d6b1162e7f23209866930eaf1ea10c005e636f4f","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.2","@akord/akord-auth":"0.21.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.19_1680793096023_0.14462862294733525","host":"s3://npm-registry-packages"}},"3.11.4":{"name":"@akord/akord-js","version":"3.11.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@3.11.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"88e1fc6d8eecc2a5f6db1f72186731da060d34ef","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-3.11.4.tgz","fileCount":85,"integrity":"sha512-/xX3KiRG1JZsO5bs0OmV/D8DGmoakCHs57LfoSnLd2BfWJVQNS8ls3cJEbu5iB+ErBtdJC6LsOj46k7khJWdYg==","signatures":[{"sig":"MEYCIQDGjhT/qs4zHFMRzftxBKmAOJonEIV6tnMOFOv/DrE/NwIhAKWSuVEhyRNJdcMvu9PJ92rYZC/8HpXpiCQekin6y4ZH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":279078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkL9yeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq44Q/9FOSIKXG/6aw5Gpy/sBB+h/39b3BQI+UlEdzi+pb23KYARalB\r\noKY9Fcjn6j2gAkn0ys4+IT9gj10XC9HOCzr68r8EMIYr/IrwMNxS45WjqLTJ\r\norMbxKDq6dVP7Bqlr9W8RqzxArBmN4o1tdtIE2o0VWZGpyqmszhegbhDExa8\r\nMayNfU06J70P6xBoOhB4gIVGugXlJUTCfmYACbnDOFwLtp1pL1BJKSqp88Oz\r\nzXtPEbobY8Luv0T7DaY5BFVBYmm3Akbv3PIdV04xtl5q4ciz4cBBm6Az3TvM\r\nU4TVQX7XHXVbpUhNzzw0exl9B2d5E9DIzMK90CWRrfcGPEZPGxMFg7iVQnXk\r\nUn8Og7k3gT5sxBnvT4/QWQRQw2eGiy0dgu2kMwlk8qtXIvPelVnfrYfYMcc0\r\nJrOS9F8oGXXaAQnl72V5ec4rbSXSf5TRoMwyIvJ3JxiezdsH6zQjAzDhG/i8\r\nOBD3ncOboSfKFodO57+0396NqVqOqszvP+Kvly6rRdGTE6jyine6oPosh9Ce\r\n2xVDrIEKzYe1SXZXxCevcP44S59ogoi7LE9N1SnPY9EtbqdnloJoTIDiAHiC\r\nE2txwwAR2DMlWRLGfeV6OWinToliIrMNwOfpDv16OcNxL7fPC2qNh2qxV1GR\r\n+sEm7PxbOthpnLeLzRaq0hJuLnZeYtl1L7A=\r\n=nVXs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"03e28ffd95224dbfd0a8d891a06a154298619378","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.1","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1","amazon-cognito-identity-js":"^5.2.8"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_3.11.4_1680858270396_0.4626013903603452","host":"s3://npm-registry-packages"}},"4.0.0-beta.20":{"name":"@akord/akord-js","version":"4.0.0-beta.20","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.20","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"660d42aa58bec85ef786131cbe95d2633637a8ce","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.20.tgz","fileCount":99,"integrity":"sha512-8cmm6lvWXklEnXzu/Qs0QGxX0/nAOINhqP4+AZIK8MCe970Qmn0Yw7lT00tD7ERdNHLn/69Sd0IIzKDxW4Atmg==","signatures":[{"sig":"MEUCIQDhcM7IyOJfmTKaWtGqlDIuHC2pYtoOUGeeXolLSTOdbwIgF/REXJSYbSudAYBbIOBowBUE7RPN5GrhcwvZPjD+68c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkL92rACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrAoA/5AclcryUU7bUlq8GHhmg0fyOZsKO5s87d1EeB+av9RQzDab7N\r\nHP1bzjWOrGwCDR9CrejH0TGhCz3hkakUkNHY4rK1T36Bq1EdJn3uTbhiaBdc\r\nJ/UajEZgy6UvIOjMmwud2P3Dyv0jpkdW0d8ONPOB5yKRB2nz75B3VzaI7DaZ\r\nuWcdKY8KF4OpS0Y5tIVLyU8xGfFgWwKwR+V7148cH2R8EaIDlG/s2Zyl13ng\r\nKoaPQUzrslR2RduPwqojvcR/IX35XRQO4GAbWCtWw/02fUfYoWbRB6bK7Xfj\r\n/B1weYRi2DzJhJIh6zF+BG/UqLLnssvg3O6kY7OmI6uPWR91WTtoNbj38mI+\r\n4oQLiWLtlP3T351Jxof+YALoUdCmn5P4hxejYBtksnVmgUic1ab+sAmlXo/o\r\npQWW7c/pWioffbZDbmNjND/2QXwr3sB4j4WT4FOpZIPUW8CBSUXBcXJEp9/X\r\noZR94xYTrxD1zJGMpz9uC27glbpHIEWjnWTVnNx8a3cjZP4kkh2TAVCI/7zD\r\noTyWo5PnK9dIHfuSPNaFxlNaA9pCpdYKKTiZEnlUJYNVePYWLaKG/Ms8JI9T\r\nqfvoJj3iR4sgFHqQutNmXVPZXI8n26NVdimcie1s4UEv/bGx0fpi4nqcXjeZ\r\n92p6A08dDMQL8JyXeWS5tLpOma7naY3Cxd8=\r\n=8kcU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"d6b1162e7f23209866930eaf1ea10c005e636f4f","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.2","@akord/akord-auth":"0.22.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.20_1680858539190_0.7311254699291292","host":"s3://npm-registry-packages"}},"4.0.0-beta.21":{"name":"@akord/akord-js","version":"4.0.0-beta.21","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.21","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"68975ab4df9c68cb8c57396f5a8e28117e6021c7","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.21.tgz","fileCount":99,"integrity":"sha512-ILK4zKblmZzg+L2ORfwPu1OMLfzZjPzDWdRI/c/t2/+kdv+gnkfSyUoUTZviCticrlvZEr0DfxJ2uO4DD0aYpg==","signatures":[{"sig":"MEYCIQCzO/JN0JnCtjkhLhkKPs2zec8H/oNEQ5hzh8fvTkpBIAIhAL4rO3JqHaEIZa39xjF7AqVVqBQChg1V8qUrQ/f7mv1/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMbJQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZQA/+Pdbyiwgw229QHu6nLahwtsoIE0XPX8SAa3Yi1fPHq1eIL5DI\r\n+OvKCZgFVj86NsyiI3/1awgACQDTZxEHvH1GfzCz9lJuSHU2CXRXrWnaGjkN\r\nXRWezvPKoPPI5JKKWkZOaL0fBPhCUExN0TnZ2YjdvaaNlLr440ckvLUO/UlK\r\n1phgxBnDHa8oLdMhT2BVW3Nvhl89quEM0WaoVpSTJ4VMgMyJ6yZ+3iLWxWan\r\nQoWRAwce6aE1NV5+sC5GCvQUUkqQr1s39VyjDd1GA+IFDi81q25euxJvZMAc\r\nH0JipxdmHazyXZIx7LQUsZRKQo6S2biTSgYLx0fHcZoHw4Vv8JRY5ASqGakN\r\n0ea+ewYmNB/oDDDAtOKdfrNMri+amv9IvDOlTzIRDbZNA8sSZ+wBhIIzKxty\r\n3lYuN7MvoDq9qajAgHp2iTsexUoxtM192zJK3M1N+TgKwaeFIzV4rqM0D850\r\n4QReWVhH4YwsJRSTMb4vcy++8n9XDWxoK1zIaukEBCMGmdptaelZFKXjiTHE\r\nw5oBwmXztJTOm1kMycV76+bnsWAmk8DpWaybxab8fgtgJkMvYv1vXtGKxk0P\r\nYUyrljVA9mjvlinb9ZuoR48qymJUM3eFj+wN/j3CwJUpLpdtmn/dIYbkM0EN\r\nO20IduOl5wJ1GP/bnU9ZmRHw9XfflU6i10I=\r\n=ZAXN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"193062c541ad06c186d5b872ecf9066d15806b43","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.2","@akord/akord-auth":"0.21.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.21_1680978511979_0.11458840546707161","host":"s3://npm-registry-packages"}},"4.0.0-beta.22":{"name":"@akord/akord-js","version":"4.0.0-beta.22","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.22","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f2075f21d2b3be77680e668042bd1d760fe21d6e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.22.tgz","fileCount":99,"integrity":"sha512-96YONDrI+shnXtC2+gV5lbK0cmsgQMy5XUrE9+f70F19//PFYPt8llcllzavP8haE+VW5SI/JWZUQmTflBBjDg==","signatures":[{"sig":"MEQCIGbNIZH0E1TCLcge7FSEay9ZmDuMyw6zjFVMizwsP/waAiA3H40coJ1yBFdfr63nHxnQhoMvHTZ6yKbx0chqkB9KyQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMb2pACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1Iw/8Cir3xNYKxKa6OYck1j4Zw7WzvFHQ5xp7dCFonxEySwCEUgD6\r\n5Ct/MvGCcyY3uRQzlbHxpPjrmtGY43IZhHkEWUxSRz2jn59uzDEF2PhqjB2f\r\ntiUrg9edcg2z5MhAUiKHUMpypjHkFqF4ibjOl4ctMtDCRgDRriLqa2sOHcCK\r\nID9aIAziNXIUi4QhJnbzWL8LhdCxCNGsmzz/scdeLI92mQcRcrClEdA3MHi/\r\nqUAHuH9OpcTNyZ5LNQN7yKJ/Vv0PoOB8qr5Qj0xJF/giaU5mK1DAOQ/B8Xrl\r\nYvx5UybKKVJ1/WZpBS3kioGDeXBUayXOzu2DpWliws4+EhiOeY9yYeUEXMkp\r\nmm/koU7YE3djo2bMWFcb2hHWNh2XqTpsvW+HCDDKbnBUMuB9efwjs5wf3pp0\r\n886l7ZOIE4QnMTK3MmAyfYwye7SqyxqsRkdaUnxISoQgR59knUAbrPyiXXR3\r\nW+EAcM11JiLieejPAvheHZJKt1zG58L3NsxJPxNKLW07PFkXLGSwtl1O0h3z\r\nk/HGqT7kRnlvQ0HVs4Iq4e/KsKPQMrFjeT+cVs/BOm8X0L1KptYj1vRc5Y7k\r\n0cF7fM3Pbx87ZosMbONVZ8JZe1Jv0QV+6vk9Dh0AIWQ8SzJSAcoiEikvNd60\r\niaqY+1pGx2j2IlEpWU8w4/og7en9+R8znc8=\r\n=dhZ+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, shouldDecrypt)`\n\n- `vaultId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, shouldDecrypt)`\n\n- `membershipId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, shouldDecrypt)`\n\n- `memoId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8), required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, shouldDecrypt)`\n\n- `stackId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`](https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149), optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, shouldDecrypt)`\n\n- `folderId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(vaultId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, shouldDecrypt)`\n\n- `noteId` (`string`, required)\n- `shouldDecrypt` (`boolean`, optional) - default to true\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, listOptions)`\n\n- `vaultId` (`string`, required)\n- `listOptions` ([`ListOptions`](https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/list-options.ts#L1), optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: string }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ transactionId }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n","engines":{"node":">=16.0.0"},"gitHead":"193062c541ad06c186d5b872ecf9066d15806b43","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.2","@akord/akord-auth":"0.24.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.22_1680981416967_0.2970843986119518","host":"s3://npm-registry-packages"}},"4.0.0-beta.23":{"name":"@akord/akord-js","version":"4.0.0-beta.23","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.23","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"da6196b8a24a752d75b6ddfbfc1b6471c4f9edbf","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.23.tgz","fileCount":101,"integrity":"sha512-4RzkxlKYiQsndRNyOFU4HNAGpD5XBH95odq1+Q30BKpeWF5fB5Hp1IE6sath2dDx821G5Ly4NhDJJBI68VKUJA==","signatures":[{"sig":"MEQCIBe8B2jIaDHHv3or1j3Gxr65PNhyZdm3n8nIp07FKxgpAiB/JFgSfaoFH/dtYRgDz8ZhrvlDGm+/R1xUPUPPWqmVyQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkN6kgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5Kw//bm86C+HbNs4gWoGR/ivh9Px/ZwomQtCFPaXkQOCsWAgLj6Jy\r\nS+ExBOYt79gBqXrCtBwyHU2lDUbOkeR6GR235m1EA1jXcs6h+TSRa28IWM6p\r\npQB7vECwceikR7L51KQQWOovGOInQnWrBtndQLYE3SlVHgUQTGWlIs61dmsO\r\n1qnFhc7bXby/pY3xmlpdTLE2dA0fxi2E05E7HdGPOSX9UUOqxbIjyP688u/e\r\njud9eU3QYuCWFgqMDpQEkQYfmeO+dvN6FbQkDg3CT85M8IKiC6dNaKCw34yT\r\nkHKlXgaFgQnc8tQU8bQPHc4aL4wJ/vIycZGYuyHqI4x4Vg1NE6C2Xl6zCQL3\r\nPpk+s/Lt4pAaN9MnJHR9ZkPWR0TXqyV5WF6pMCvWYixU66l0ZsUexjAiUR4k\r\nfWKgubB+jG5Fd5Svxgl8CTf0KB+GW869UvvH6ItglOijoG9YfQ4E9N4+I8w+\r\n0sPeOU/fIEDCo4GlP7M8i3leHhbgshXSBVXmruWdB2fePfT0LxC3xR9n9uMG\r\nPKHU+b8g0aH46HW3HVJ/Fd24LSQ4pyJj1BTMsLUUw7NfoF7bm8L2DzLRVEKD\r\nYaVs/rySAhhQKiewZz6qRyWru5rlLNIt6r3d1XzbNuM9iqLqry+i0jF2XnTZ\r\n2ezdP1HoQShAihH1J6q05tauncmZK3Q78pE=\r\n=PvbY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, parentId?: string }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `message` (`string`, optional) - email message (unencrypted)\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n","engines":{"node":">=16.0.0"},"gitHead":"4e8868fabb4a5ace7342a0701034e5230f82b263","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","cross-fetch":"^3.1.5","streamsaver":"^2.0.6","@akord/crypto":"0.10.2","@akord/akord-auth":"0.24.4","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@babel/preset-env":"^7.12.1","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.23_1681369376164_0.9391589062480328","host":"s3://npm-registry-packages"}},"4.0.0-beta.24":{"name":"@akord/akord-js","version":"4.0.0-beta.24","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.24","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e333e6eaa5ca5e0f507d215827fbe0915834215b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.24.tgz","fileCount":101,"integrity":"sha512-3kp2n692HMn/ljBXUl9hzjHZkm1fImBZgl+wMjiQXhLlgpsAIOHV/9egTLNS1zR5xRyFh4RBHYevcXIBt8pMAg==","signatures":[{"sig":"MEUCIELnfXOP1YsofiFQYKnvywXtYkhXGMh+JdBjGtOPoEsmAiEA52vTlEUOzHaoqlxuiknTS0fOxUPkAWfOZ7vniOmOSsg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkN+PqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLWA//aZXfRrtxrXhuPQytlLPUYg8gg4dJlBK305nMmuBMqX3+KPgj\r\ndtRTZtg0XJMZ9c6PiR6Dvue9ahr3mS25dl+mBZA1YrnlvqIGEEV7IvBDQwuZ\r\nVdVZrvrNHRdk7cCm8QZsnDEzJ9ViOkzPUR/Kb8xyjmNXokS2AB11YJDXJrTc\r\nhkGadaOBxe7UwNhGXH0v0cpMc7JUUefV6KtRhkLT2EHTjuPVH8Z+UPwSngzF\r\nd8RLvfaRK3NHsGPOS714B2GUgdEPFXYgSGaIXVfjyhKOYOhZ0hBwakVFO95u\r\ntjB+QzHA1C4w4sJ6AoXNZgvzL8grl3emM53ztl52whB8rGHu/nqUd69ameqx\r\n/BBcIEteO6tJ18uBRo+ZftVpRHAuwwNMDmnk4iPbH9SwnbgS1+kwZEzUWcBn\r\nM95ZpLLwbsjWGohIxLWhTGIHWHOZ580XAx1Q/iCp86ytT1+iu1lwwggD5aKd\r\n5+e43Ipq7zRpOGBkhElFPdb2Qoq3ZjpNKegHDnqsTebwsJJ++DiYgYeZAUoF\r\nAe3g5ewXnJfcFqpNXVtsa8rr8mXolWsXpxeBudmPtXvlB3MZK63yJ0oE/1PM\r\nozIfk6e80qD8zzm7MTEoeeSWrQfItQUJAIGf+lJbE7Fpo3it5WFoXtbgPkGe\r\n5r8+DmHaTaXCaTuw5HuWeNyGLp+mcxjfzSo=\r\n=4EpH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, parentId?: string }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `message` (`string`, optional) - email message (unencrypted)\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"80eb11d6f1b0e0b9f5fb4cff562b901a9668f4e5","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.2","@akord/akord-auth":"0.24.4","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.24_1681384426739_0.30054661936216376","host":"s3://npm-registry-packages"}},"4.0.0-beta.25":{"name":"@akord/akord-js","version":"4.0.0-beta.25","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.25","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4ad01235ea5ec530614c65747d929484ff74223e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.25.tgz","fileCount":101,"integrity":"sha512-WMY9JikSfTPkXeB0tqGd3i6fILQvOUKy/ifKhxM4embpjGBMSTyyDO6vOHtZxu0WQL5VSY539ffVuMQyR1Q+2g==","signatures":[{"sig":"MEUCIQCycIzTCPYMcidCwLfUEZZmc9f4XblFRA5HT2YRfPCv1wIgGRPelJH7IOEuAH7ZLVcKZz+hTbFKUU+mhsSjtzH05vo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":289177,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOanPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpwhBAAlV0zeNaMoTDzIgSMeEZNegrgGhs9gGPul4hVaZA5w9ITYS2x\r\n5ZWPKaOtE2ExFSkjTQA6HUmp64nOtkBpDfYmfs41C5RmXefD+etdyuW9+qk3\r\nvnaXolYGAJI+x6RF6SnnqotaanUPqxBS+wpFOYknsKkdHTSl78rLR5cdrBGc\r\nb9bFZl0b/jgMq6sw+u7b1dKr7NTdnCZiFoapoPB13Ha1u/w4ceF68KvWlhIa\r\nEQf+0ozlEEYwsQrmMwXa05ZHHeU9xBr9M2aiS7Ydd03ldJeRd+KKgQib243h\r\nhwic+j7nT1+ZGulO1aKohz40637cWHF8wf8dXqOwNHlIKBrTQFT9a42+Zxk5\r\nM+IZs4Io21hrDy06lF1Sp7VxfjHBNfaHJMb4qfMgIww5cUyk4V8ADv9LymUC\r\ntwt0qVhpsM085W2wjvF93XVHptQlHzXICHlinrj8CXv98BRmBt6FpboPQMuQ\r\n28CWj8N49ZLPuuGROibWAnEWNHOh1icqUDPuFzch6/lcIwXPnP9KOHASOjYc\r\nREgd4Is6P/lvgXaNDdWGE2nAT/wkMHztFd70lEJEdh0Lc5QCrwFxVr124Ei6\r\n9sKJw2X0zamnZ5iXYxMH/cSiRQeHHPPQtJ53ZBub/7H18t0MpS/qWPX2LuCR\r\njQXBb02jrZXZ6Bhznqjuzqun6W2NsbB3gus=\r\n=qale\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, parentId?: string }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `message` (`string`, optional) - email message (unencrypted)\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"6d29c329b0bb2e8ecb4fd43ab14f766075900362","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.2","@akord/akord-auth":"0.24.4","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.25_1681500623353_0.3207272201437281","host":"s3://npm-registry-packages"}},"4.0.0-beta.26":{"name":"@akord/akord-js","version":"4.0.0-beta.26","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.26","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b941bcc654d840a418c895f0916fc7eb0fd85a2e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.26.tgz","fileCount":101,"integrity":"sha512-afmGeoNXunfcTH/ln2GLqI/TFpEQQyhx7hSat2JRJ9qiLkXuUU4SngX6RAKVj+qu3D5e0Mjo4xriGYRpRwQcDQ==","signatures":[{"sig":"MEUCIQDAE0QOtktiHpwZZdS0mRbkx5Nlm4T1LiL5lUHEAsB6/wIgTsaf/+z0iJ23kE2viv74O2zB7lgR1tksoqfmjAIoG9I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":289088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOa0cACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/pg//YsmiUBe+zBk2yPP2RjMTaylYy7E2ALQqZhurSpusCyzy7FLc\r\notXQGjOVUqCrMx4eCVOqVzm6TNeltbs1T++RIv4Io50m4Vn2UTINbd8aB9Jm\r\nCjoHoKb3miC3pskk1nL0/pAcMRlI9Asi4uOp+WWgeuDtBVgT1g8pirlIlzQQ\r\nLfTAGNjGDTjfu61/4LEpOGmMnnqDVz57luC8ZqkorApXvWz2Eo98spdo2tW7\r\nIldyuxbFCzjwx3eXX8oCExHwWs0dovLI3DBwpcwOjbkOEAppjp5cr51XvsTm\r\npuBtTYlEhOgk0fM1G1vDKXyBFzeAHkzffmI8ndMez3dAUETlSBxjU0OKniJq\r\no/ecifSQRjaeNui4wYi0SaN3fv31wL2igvVZgTYl0KeLHSizX4tJGgK84KXf\r\nr9SQMHadiIrMjn0qK6p7095ezLGF3IKo2xJ4l7qMG2NlikCrZDTCqFTjI+5Z\r\n65n4qwl/RPgTMITfvP6WHSbLEj4aUzsK3fV9mMVNwzmIlOif1ATW0ev4SxKu\r\n3fGYUNKWRYO/Fcufw/5N34u3lSEyeP/xJyq4yjRzcyI04E39YgPmjQdATmAu\r\ngE5oaJckT22Tojbt9UFnt0yT35l5sgLYT5QVkpdCX8apH2DA+uON1rvkX5vm\r\nWIggp0dJi3yW9DNsOypFCoMyxCqz4gjZnH0=\r\n=7Se1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, parentId?: string }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `message` (`string`, optional) - email message (unencrypted)\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"6d29c329b0bb2e8ecb4fd43ab14f766075900362","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.2","@akord/akord-auth":"0.24.4","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.26_1681501468121_0.744602611405295","host":"s3://npm-registry-packages"}},"4.0.0-beta.27":{"name":"@akord/akord-js","version":"4.0.0-beta.27","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.27","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"49d732952537a0cce9f7b5733040bcf63cf54a19","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.27.tgz","fileCount":101,"integrity":"sha512-KNaEKUazEvhpodrkdevItrnyN9ZLOzjoJkSDmoCLbW3q4yNuxsY5CQkZnoE1TWKqUxKnWpq5K/v1xWx7J4+8+w==","signatures":[{"sig":"MEQCIEaKtaR35lBnFFuPDSTApqsYengbQ0cZ//GXQiO9e1E6AiAnQD2yxnMx1IF+FAC7yHWMTvbr47Ri60PT3qF9JOBBdQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":289130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOcL/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo00xAAiBdsU5BbOdDw4lcr5ipsw4mzLYQh8sdvJjSvVyL/+v9jYF/N\r\nat/r8xWXPm5z6JHH/nkVM3tfSa+vQcXsNK6mzTHkwVKBAEXdf7/DFv3O6HSg\r\nq91ZYSQabcRO+rANA7CXYh3QUavlsH8a0sRY++YM80/9kpy/jOSiRa1R3pZB\r\nMmmgLkOMwHlFi2+UEdaRWhHtzmRpgkb2G0RS2j+m2K+fp2A/PpPIVR1R78e4\r\nlpuyfIMDRd2RzANlg3tX39RR0Vszg/cai2g87PWeanRgMPdNbvALDy+qkfvH\r\nbe5XjvqjkvMjDjHay/ay6jc+4oNtSYMNfTNgetvkgcwaeaj8msDa2l/QcxmV\r\nFclwYLOkhBsDF2l8VxO0ifycgSWb0R1FRQt/TqHLHlG9RyEEEzagVq5/yn+N\r\nIPtmWaZSOa5kNnfl93p4sQIx640HktyVVwEWJQTtuG5eIi02o5e20W5LoNcc\r\nZIYacFTOdIviL2Bd06+ycX/hkGMWrmC23Ql6tRFE2RVZNJfu/purtGeIzPvn\r\nJeG9F5zYhw9IsAQNViGcYL/lfeVUTutHr9520OaGL3209hlJ8VnBtckoggJd\r\nS+mrAq9JUJ49JEZe+Q1d6kIImuVStCWMJV31Fj9EB9bf42dicYFxbC6rNExJ\r\n3+6pGTzWYmMZExSpeSz130zJXZ6kfFrid20=\r\n=bSXv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `parentId` (`string`, optional) - parent folder id\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId, parentId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file, progressHook)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `progressHook` (`(progress:number)=>void`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `parentId` (`string`, optional) - parent folder id\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name, parentId)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `parentId` (`string`, optional) - parent folder id\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  parentId,\n  \"application/json\"\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `mimeType` (`string`, optional) - MIME type for the note text file, default: text/markdown\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items, parentId, progressHook, cancelHook)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, parentId?: string }>`, required)\n- `parentId` (`string`, optional)\n- `progressHook` (`(progress:number)=>void`, optional)\n- `cancelHook` (`AbortController`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `message` (`string`, optional) - email message (unencrypted)\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"6d29c329b0bb2e8ecb4fd43ab14f766075900362","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.2","@akord/akord-auth":"0.24.4","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.27_1681507070884_0.11965749689665706","host":"s3://npm-registry-packages"}},"4.0.0-beta.28":{"name":"@akord/akord-js","version":"4.0.0-beta.28","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.28","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3bf0f7c7de4bb838e6717ab791c1bc8abbbb93a0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.28.tgz","fileCount":101,"integrity":"sha512-OwmT9+TT+tnvgq+5+quqW5uMVDiRHj+Jd4JSxtuNMat6WfqFYzuKSNXONZpa+FJXO0JCD8jAeEwaPXCffMSfPQ==","signatures":[{"sig":"MEUCIQDj2//4kAKGxCwyZPF8AncP8BsBWPOKZTO9WcrLuQRgeQIgXQnkzf8oDDBBkkT1fB7Drf18shya3/rp00m2BL/jYbw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":289443,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkPqLVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrM4Q/7BdCWnqqeG4fuxIQUWeHkdkGuW2+/IyVfwGpQNgUdQ5kcDCeV\r\nu6Bqaar7xX13qIOi72Q6XAEmyK1C26sT4KKPfdPYLFCyBV4i26VXKOQUqkq2\r\nsqT3LiL0zwvSI7Rdjs8G4P33tifBCiT7C4AxMnrTou68RUGOFmO3hIwawgKf\r\nKLTeuSK0iRlPr26yFwb2BJ9ZnFT7s7dkTEnCsSkELhvW8OEYvFWopZSGvodc\r\n9waculA3C+PhSofwWYTULv4rTd2LYpiP0qu+IovtHf7SGG6a5a+iULWNjqde\r\nc+NqvyHUUDgCo+VCpE3yuS5j+AYifx1ztEnnt3LIiNoVne0zsu0uAW8pSXZD\r\nJga2IWvaWhMBNhH0qyov94hd82iBXXFaVqw4sJlwmaWuPBJEI2TXowJceyAZ\r\nKps2DuqbAURc/YVssu5KyTt1CA00G2omCCMlcj8GBvNv5oLWmaHdsovOKLMv\r\nVCIgwMKRweAx2UC1YY3BM9URcFE/UFrJ3DxsPY20M7Wkh1ntWm5bdekuZaRE\r\nqQbyHBOj+V961ObwJY9z7bx3NOBqw1hJTDXPXoTomUGFUjXjVAI1f4f98AsF\r\nTbiOB9mBhvlFQ34Hb1+qC4hEejIEeVP3rNPLtyWJg6pfNSF6xKWm0p61LRjK\r\nyokDGM0rpj+CUx4kLeVGuhz7+UGB+NlKesk=\r\n=M0uA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string }>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` ([`MembershipCreateOptions`][membership-create-options], optional)\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"a8c8abbaf2900b41c38c37c51bac7b3da6315b11","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.24.4","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.28_1681826517134_0.6425065108207728","host":"s3://npm-registry-packages"}},"4.0.0-beta.29":{"name":"@akord/akord-js","version":"4.0.0-beta.29","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.29","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"216c55d536722b4ca2d8b601024c5753f274da36","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.29.tgz","fileCount":101,"integrity":"sha512-tg9/X/xdzA2lz1jDkeJKZUz6cNlTgh04rAfL0gDKSpmF4yV2Ii4kLkStQdoyhs7KdRbtNTI15wY6irX6QD1JxA==","signatures":[{"sig":"MEQCIFptDwaEcMRVjihadV+EaJZ+3yQK2KuKg/ULXkwAdN8eAiBipQg+0pCcpAxFzfBY/hgEOYvWRoeXaaW7kGIijz+7QA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":289455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkPqhFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqlsQ//dU3nv9QirB/zm/NWjPwzI3Fpkr0nr/NJKXzkvAWQszIxAdoz\r\ns0EiAWWmK7OufM+4c75XCTSvTKLYwUPWxBOOqNcWKRs/IeTuj/6Cxjkg0WhS\r\ngndNe18BH4BGeaCpT3At00OLPXUMGfQzjBKcx9Rd3iDQ8Om+fZ7jwRYPzTvg\r\n1Whi1iNrJdmWPZ745SAYq+TfScufUxjRdVzYvhgspvW5evyERSJKKd9bSjzG\r\nYk+LKMcLo/u55ljq6jxDdpeQs0MFkFcaHVUsk48p1nNSQLeC97sri3Mv7WnT\r\nQmplhE4HAbyDIldHCs4ddEk8iEt5w5SDkVvfw2UiNG3SltpQ8mUAgz8daG/7\r\nCh2GsxnktVk36rXHHWgCoAUGBmrO3oVxCEhDOvUVqFMbXkNDn0vJERbtv5O8\r\nWEwtcbjIyKOU6T3/KHVszT7jZq/tIOXkhiDjMThsTWwyqAGXTNjqXVP9z9Iq\r\nF/jhTX8NkQpLhC2yQmb5e13sXu1vRw5J9XgK2RtaojVXOy3EJ5zYdgJxa3lI\r\nMgfFOi1C38CUju3e1zHjrLQLQxvaeFGdPwCjPzzSXel7OfU4SWBM0QwGWnqc\r\neKK3DA0Mp7ms84n9Y2KZ7LkGYkKvnI+upnP9g1j6PU/psxOYm+xgMB8i7X5F\r\nwlL2oO5Klp0bPxXDaZGTOkq9WC/bYxVe/vE=\r\n=sA3u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string }>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` ([`MembershipCreateOptions`][membership-create-options], optional)\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"1ab4db19d4afc2e429877bcfea94b1e03a4f99ee","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.24.4","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.29_1681827908943_0.9595635770695763","host":"s3://npm-registry-packages"}},"4.0.0-beta.30":{"name":"@akord/akord-js","version":"4.0.0-beta.30","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.30","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b851d09e6049d79e17a9d5ffc8147674243f13d4","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.30.tgz","fileCount":101,"integrity":"sha512-Aq59vw4YENnIyGqdnqt5jM7atL/oM6n5oO/+r0F1WTSFnTXclnG3TTxemkDfYKTfoWtx9K/ZLnT/+q29y8q66Q==","signatures":[{"sig":"MEUCIFdXJT11+ybeK2DoxLZVH+9ghqp8/ixJg1l7nGAShhBNAiEAhpdVGVUEkqTVvo43HBsqLgD9oeP81btD16I6ssTX59w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":289502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkPszNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBmw/+P2KvF+mp/EvMocDqfsdZN3gKpkyZuAuViqcdJiZ46fKDJEvl\r\nZWkIu6NPYjtp02Q04O2G2Cp8v9ZZgTQWQONxXZYHeJ5+7uJQ5O56JZmGcTfL\r\ngbrUT60kp3TqsVX17Ghz6YIvcaijGNnvaEwwhoEjZ3x1IE/TuoaOm7mqyHDK\r\narF7TpSY/5dGcrk5O/rp8cOTrilM11VyHgE38PhS1Hh/uYjncUW1PykKNeJH\r\nhvcycgTtXZg2S+73XfywMZT3GQu3RtGQot4IXE0FVkYAXVP3pCCmAomm35nj\r\nafLu1JDpL9+cnqmSSUngTOE260w71YTSnecHZ5Dng/9qMrRfEGbGzBiTS2mR\r\n3BeFOehUEZwcmDXzMVik/L07wImtW9Jk0uDkQXuYSlUOFJ45x75T2aftYT5f\r\nVQf1hNYAIXPguJhJF/+ENBhwmp3odZbwple2mhvFO0mG/9GwdymBNU1hJen+\r\nYuu6/3rdY8i5BiybB/GraR28fSFQtPWsVqhQWoa/Do8C2SNch6aNuedXDCcb\r\nxtUCFEldOXR66MOYGVPkJpEBBiZqYuRTgq83vuBw65bFMqXTF6hFEKSqdsdl\r\n27q1yYb23qiFvzZp0kCyVr2IAgAWrOpApEpmc3WNh71JacskdikPGs6rPse1\r\n+tn3oRQ+G8fgUXE1yoa7vRkKlLKTWoh+xF0=\r\n=44sS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<AkordWallet>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, termsOfAccess, isPublic)`\n\n- `name` (`string`, required) - new vault name\n- `termsOfAccess` (`string`, optional) - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\n- `isPublic` (`boolean`, optional)\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { vaultId, membershipId } = await akord.vault.create(\"my first vault\", \"terms of access\");\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` (`string`, required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string }>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` ([`MembershipCreateOptions`][membership-create-options], optional)\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"e2640dab88f6d87bd9a451f1a947aba917a2d144","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.24.4","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.30_1681837261273_0.8662058175277947","host":"s3://npm-registry-packages"}},"4.0.0-beta.31":{"name":"@akord/akord-js","version":"4.0.0-beta.31","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-beta.31","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bb6808aa1a8215cc34b80dd0034424791cdc6611","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-beta.31.tgz","fileCount":101,"integrity":"sha512-xagzoiD5u5mgoU/8EiGpbFwX3jgLSF1YjBb3ow/ZruB9fzYsC/DIGQwoHHP2NcCfOegYHUL9nxXYGiNAYLxKlQ==","signatures":[{"sig":"MEUCIQDI/ol+RkLnTcCEL3uu+DZ4DMIZhf4bOS8gaQjhB73aNQIgIE4gO09sz0rciV7jL4gwK3kHC3QpEkzb1iFifXW4R+8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":290063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQRYaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZcA/+LFpSwLbeWtlOWOEW5Mr+HltvYdssDwNgRbHaCezbYGb/Tups\r\nHxKd+nr53MxiOf0fP0IU4Enm3rRacKGZ5wgzWi0XG/6ynEpEbaFNdQtOU/c+\r\nbGETBOeraKGmCCBW7xBr1vFZD9IWIXIfybGwBN753cqD+4jjqZig77qol0Rv\r\nasqthMsAYeKJcSdYGlkbP9xaihXW4AfTRhm2B0XfGx5FbUZ6IK5fyje3YuPY\r\nUb7fES1eRWEBhb38S9F774EXKzDgM+S20jseqhMsqPJGggoXozZFCk6QUp8d\r\nSP0TZsm4hhMw1umwsQ8RJKUaRpv1QKo47YuZKZj4pj0CI+5nmj8Y7a0Alhii\r\nYesUXZn6UY/B2Pli+8LzodBjWkIILAOwopCSSiA+rWPJVLYJzjFjtApyRVR2\r\nlGTxBPkHneo2VqHrWhRrsDkT8FX9BIYjjKJNQPKJlmUS9AdnDOF3cygZ6UnO\r\npGWIjLOsc7+serT0jCify+3hOWOW3SCZtP1R8YnmXc7XcxQsO4hXMVPoZuCA\r\nysaOIqtGCyVn7i56Qmmlchb/E/nrtjMF2ls2YEWXHt+1IOVJKfdbY17cc59q\r\nh+9sEJK/F2KjG9RD+iowu0CpiCNulmfbOksfQ1sbNlYx3V0GYWnv3wPwADey\r\nzDGOaImDYMKBhmjk2wa2a3lHNC3s0la+XMA=\r\n=02A4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client for interacting with Akord.\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string }>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n### Deployment\n\nAfter merging your PR to `main`:\n- go to [Actions Tab](https://github.com/Akord-com/akord-js/actions)\n- select `Start new build` [workflow](https://github.com/Akord-com/akord-js/actions/workflows/version-bump.yml)\n- run `Workflow` for branch `main`\n  - it will update package version\n  - will create a release\n  - will build and publish it to NPM\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"991a5ad40ec48929c57e96552a177e2e627e9b81","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.25.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-beta.31_1681987098708_0.8643212126157833","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"@akord/akord-js","version":"4.0.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"292c5b21dd399b1325c52821a61044d0b52d980d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.1.tgz","fileCount":101,"integrity":"sha512-eI2ocz6RiamILHxq24vPVEGnApDuZb+7AGvTFXdmP7BLslGRYEtMbjttokhKOiQ6puuH69PxETQ+PdSul26dGQ==","signatures":[{"sig":"MEUCIQDh5oF2vqn8GrtOjpkdCC6MZpDZgDtmOGgprR6qlcNXcAIgC0hBKXI956lkgJfp5+0AtKOlPBKnm4RlTyVeOa2gBgw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":289935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkR5ukACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpunhAAlyao/sZwAxxKuIhGxUPjds7X/BEoa3hyu+Ttgitnp7HGvEir\r\nmlnRt5qS0JFHYPzbQJkkV6dufscjbt+/NknyEOp2/xjt7fxrc8BE1/6tl1Dd\r\nfRHyVBFooxDZb+s2Anf1u42Gvgjt6wC7eCSRJYiJ8BFXDX7fVzxa8gFLcUOV\r\nwsG9gWRoRVfjgvEj1GBBscGOL14WUq4YmOjjk1gCELkDusIsRTbb4AbfQ7ri\r\nV9KgU+eIPr1ylXF5WgpUB1OtgW7IySnkDBvQ5nUhmWPiAAk/DunZHjX8jhHr\r\nvbMxduQcAcasDzUmUfcYxmo8A2cvLBrF3l/Sy9E+t6gO09dNjLVUHxDqeMnb\r\n8Ttb99PQFwjM1WrUvtwWrVXtr5dPP7QgBF2VOJhq68679rea/w6Zy+p0aphd\r\nCHxn44jB4iBKDDohPOjwLx58pBvWE5RbKDzdz8Cqgrnod/m1WMfSHacEsz01\r\nc7cYGGkdSd0LLIwnfluevdrDC2I4K5jlRIAVHUX/+8qBDTVbo1l2lYsjAjMk\r\nsh5oLDPn1+RqY7XkCFqddNQ2RwSIQbSrXjVsKsSFBi6sEVxCQCynU9WBlrjj\r\n9sT88zd5shra2pAOxR7XTl+FEV4jolWOAaPTY/r0jezcRQrFaXB21G3cV0te\r\n0aOgBG5Ozv4IlUPg+ixIYP6ufi3TM9t0zL0=\r\n=QCtO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"20b2ef5d3f0007e6c282453027298f6da9f2c158","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.25.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.1_1682414500700_0.7802974436762604","host":"s3://npm-registry-packages"}},"4.0.2":{"name":"@akord/akord-js","version":"4.0.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1a33163592ea9c7a57ca987c01303654e05249c5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.2.tgz","fileCount":101,"integrity":"sha512-5+3PuVchSjhZP7tWk5VmAtAyJa8yRb87LaA4BYPV06FcP56WPcLMKmVQuZCOml5cp1fV0wTh8xrpGBIcPpcnLw==","signatures":[{"sig":"MEUCIQCCK59HaCT4izcodLoTktFq1X40pCsaFljNxNxlF4/TmAIgA36xYQGPvrYwrCmBRz1jhJTqsa4H+LRvnyO3ZSjEreA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":289935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkR+rdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrm2Q//Rt5nyt/HMINcq7BiQ7IM9pLVgoPuLM6BDqWPF4Yrv1ULNphb\r\noD6r+rP/CY2dMDzmUPvUGaMIkEkfa8dZsSsGIj/SqY3XSz8qeYenO7PQAEn5\r\nwPG+ZjMJfVpS6ZR2XlBYYZt3T2Ji3vdjyTxZNg7G1TmP/KwKnQf7XYZ4a/Pn\r\nGO9jBCYRGnZtmwl4lbOqCqV9U0CP95ueodoqgUCblKM0gksOeJahvtWjH4LT\r\nlJmX0uDZdIKkl16NWsDfs+M922ugHu4Q4FaJpXPcKAPUNz8D78qXdVeS6qHe\r\nLq7ITmoUb3sACTx6QDDc1HpQnDu1A8jilteh9LaQyDgyk12sa8djkJ12A39N\r\n2ah21HeO4/8+K9qSvqj28WB5EbwncUg6CcCk+17DSYQXamIhsaX9cZSkaZ9/\r\nDFg/lz05OA/8OPCTJrEUA0FXmhWoGEsk6Qv0nJvzRNNyDC09VO/7ODrhtfUv\r\n5lbEpdjizgourlRy7ckeZyJY5oX/ZvyeaOcLufTlrdhRPMzDAmYWXbAUkHoW\r\nt4Le5+B/rJ/ueYMcL3ylz/vs3WsQtC01igDui8i6bRrrk+SiyyEPxMnNAj+q\r\ntfGc59gmJBduOnMns07HrgX9cZp5eVnlvmGcAoFRw2PTec+rpYZNI6P3HhO6\r\nKwVcChD2GFeRUQ//Cuha/pg9HARyUcLw2NA=\r\n=tchm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"35dbd4d9a91c004585681f26af19569b08ea48a3","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.25.1","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.2_1682434781161_0.7836506544723172","host":"s3://npm-registry-packages"}},"4.1.0":{"name":"@akord/akord-js","version":"4.1.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.1.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"da7877c91a897b0cc45003045efaa297f4a2217b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.1.0.tgz","fileCount":101,"integrity":"sha512-Y1gItlKIQV2H1/faoacEMdpzmQD56jWGE4Wk3slo4GrBFPFiunXcwZG/C3BsvjjVJnPHcLkkUppD4y+C6XcSBw==","signatures":[{"sig":"MEUCIQDSbrI0ddJQbtVRg8a3QZrOKjp7fPBp4TjTHzCj+qSfXgIgAQsX1EkgA0j1EZWniDfFfl0CuR1tzK0mijWT3kgbdYo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":290270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkR/IZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpt+g/9GkHthPundxDBw11XTSiKlOK4L8F0yLOCkNfxu3WLYFVb3bAL\r\nGTgLc/B/qIPr5zdFoEl6V9a28G8AGPtUfde1Ee4wGX/K6vwmvk9IC6U0t7jg\r\nLa7DnvTXYD3ZBWGgWgWoqNXLVpqhaE/I34mjUetWLSqYcu7+8JfhD9wgXW8n\r\n89hlq2ntjAK8x0nBw3SkHNzqmGorESuee1vUAtUIU14/IA225i+nivblelx2\r\nrPWlqThSEPvanF88SyOUbeVNy4jABV71rgsP5z7YSmJcIm/cKeEeesWCqcjP\r\ntJ/Iv6O2Ym2J2FhqyMktq0n5dqIuyKgF/DzYVyo8ZwHZ9ymvkcJOsoS3QV4X\r\nsCCPhCwmSMllq/aqiopDnCxcbD+73dWOW/EbGD+94PjMPYIJen5b7Pe1Or5I\r\neNW1Yd/T1oMwcazuZwwhlMoiSexfBkNwZZeoTfDWAVrPeavQ2mujeAOXDy5g\r\n7ZzUCRfmJLCrP0SzwbuVdFI4CazVD/cfKg9JfqEzCarNdfqSlZWWZ8JvYE8/\r\n9P3q8dQy+oOI1H8XGPBiQiDLwSTcxXJ+pS+0Jav/S6+e9bw2yjls09IM3fGA\r\nY8X5Dh5CDg6yTv5q0IqLjfi/Zq+YDgqociL0+xMk8PTBJovXI3Bu8dbs6I/N\r\nX6DgJf7pTImMu/9crZGVzgX8CkuTKxTJLQg=\r\n=7gBq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"f83acd733196ce8274d25d7b5cdb5834b9fe2a81","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.25.1","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.1.0_1682436632799_0.8408832810278879","host":"s3://npm-registry-packages"}},"4.1.1":{"name":"@akord/akord-js","version":"4.1.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.1.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f8d63e42bba85a3b453d44cb2db3e661a4dab264","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.1.1.tgz","fileCount":101,"integrity":"sha512-WxrsJGQcNM1GOJFMYrVAHVcN3HXQv3e8V/7ZnGBIxg/Y3NXAJNDcJ9El6jeOsuPZbfLMrGkuZQVYZEtnat2MYA==","signatures":[{"sig":"MEUCIGclz44uclcXoRS/eNCKbc3xYsEsGRoKI0nOR3QGmdscAiEA2ecbL7Tt/uHX5GWnDEwbvBZ/xbGzFTFLBOWiwzXTPaE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":290279,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSlMqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6VA//YuRGJEbXS41Bga7jxKW2XS2VKL3hc09D+L61q28Ajc3YN/3Y\r\n5y6tckpt6uoajpE/wjvyy7iE+ZfsI8WUbguiNlbFhRU37VTG0r+N8DWb2y/E\r\nvZ6HDmExNO5JTRCzzS27AIN8XG/7y4C1pLfvog3b1vHn0HRflu6cuZi3ComS\r\n0BHejBKwOQm/9DGaC8CM5ArhJeePcnbhuqYcx0eJfeVFzIkmsSIX3qtiktfZ\r\nQb+FbJ9vf/FYfPKyzj+1CVhhDhgG5V5qykY7ISzkComavQfuY8EZpofR5sPT\r\namNAF1Ox4gP+DXgd2EB8Ys/cAb+DY+/rFr4WzouY9Rd1BQUGdeRJ6gHbP1nE\r\nJ6mXjZeICnw1lVsdruNHG2YmGRTUQajFdgNQFQq01Hf8U7wKugm5iX/S9EcK\r\naWrBQ7dFUDJFCeY4aujHI60LGe+RsVthwN4P3OFA42qBqFmdOlXMx2QAznJA\r\nhbfHEa0dv/1jOke+1mqQnBlmlZWPz77bPodhhbQMa1O6fVqEJE9FGaLqBHrX\r\nuA7HSJ2pWoj4H7UfJm5B7IsrIykB37Bpb+cL1GgasLNGwFi/3TG0hWGzxAoE\r\nxMBqw9KB44LN4w4GELGpbIwHg7GS2RpKev52T2McpN/Y8BSnW6Yf89gZXjM+\r\nNJNIrCxSx4vVnwDD5MAaYLRjIis92pxZs4Y=\r\n=xO8N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"c1aa015bb3c8195fb63d796d30b6263d0e6f09df","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.25.1","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.1.1_1682592554454_0.7969305369328565","host":"s3://npm-registry-packages"}},"4.2.0-beta":{"name":"@akord/akord-js","version":"4.2.0-beta","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.2.0-beta","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"20455cf0faac738c8b48215ba9e3ef7b219d4016","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.2.0-beta.tgz","fileCount":101,"integrity":"sha512-r1NLaD4ZCgdVKEYuku+f9UNe2mkpICJBDnPiWUJLUDetnwkKJd9tgD+aimOvuQLJlrp2R3Q7VIYaQ3anC5K9BA==","signatures":[{"sig":"MEQCICCCVVOcS77rIAa0rZfQivSAZWDWEVqLN4bk8bmp/U10AiBwtxUjEl5lyj2xfpx+ZUY4IHO1LwPDrVUquJiYjXWdZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":293504,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkStiUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo22w/5AJ+r//272ph17cv5rzIDwjNe6HwXwNG7CUH6aM0bL7LiA1TH\r\nAZIyDJwW5JBmqwIddd5K0MMGf5od3v68fjo2S5HXblRAgXg59rfBm2of1a+5\r\nfNAQD0xrgbrQCN39K2Tekqo3qxVIHzpZIPTl9t0PSK9p5mtdjq4/vf7sIYxH\r\nfpJUzI2ZmQF/Ne6yced2DnV3LY122GWrWNygbUWTNjYeGf5nc0RL4Cy7QxZI\r\nwBAmcgdIc01/XrCFEA4vwUXvFbfBErkdHI4P16mrnD5QGMWYs6guhE6vESpr\r\nZlbLLmZX54p+BlGou4+He5FYOG9Q8dRhxQlpmAIpAUMWycI+rVCHVYRaWE+F\r\n/tfnLCOah85Ut8i6SXoSqGwOnQ6ff0koDLBbTkFQO9T0zySwjWdx/Jfh16WU\r\n1QaV6OhutQ+PfCl9v81p9CHjMJ1uWyXGgJz98Pj0oelFmHtHyd61M3lwjK0i\r\n/iUV2BDFFSZm2/oNUxT2EhJmJnVLJL1piyb6KxRZ/Wcvc8PPdMJOn04tXio9\r\nDEOPWuViVrRXADX8pxSwNAu8XY6djBX2zLWe2FFtT5mDyKOIeRvTTnZjT+YH\r\n0a5aMDPoth5qJOhfsEFiIQhkL2qPR9cqyMRNRHZizoVKcKCDcPrHe4hBZKUh\r\nSP4L7OzAgpHb3K1IP4aJMRPVgrmUPqSvJQs=\r\n=hHf/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"f7ea5542e4cafe4c2b0cd66354debbe9fda2feff","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.2.0-beta_1682626708543_0.9756629702473043","host":"s3://npm-registry-packages"}},"4.0.0-alpha.0":{"name":"@akord/akord-js","version":"4.0.0-alpha.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-alpha.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"8e252fc0bafc5742ede237f3469f82f18472a2f5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-alpha.0.tgz","fileCount":101,"integrity":"sha512-AImYtLG2l2lIsssREmTn+Zo6fdm4du/y4j2NoAglHO2FU4ZJ1IycTGatxCMZE6m61Rc2yR+xiNyeGEMMbHlEqA==","signatures":[{"sig":"MEUCIAYmvibpPLuXPzyIrKfyWZtuetrl/1u4ZB2t3tf5TUTzAiEA7oesC7BhVJkxeK2055SHersUlEYsVng3gYJ3N1EGW28=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":290587},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string }>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"fdda3cae283fce7bd2cceae3f986a94e2e055d64","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.25.1","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-alpha.0_1683040569005_0.4906623949240312","host":"s3://npm-registry-packages"}},"4.0.0-alpha.1":{"name":"@akord/akord-js","version":"4.0.0-alpha.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.0.0-alpha.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"98523113bd5fff98ddd81d86253305bd6abf222d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.0.0-alpha.1.tgz","fileCount":101,"integrity":"sha512-m3A2yvqQb+lw+hCGKzd94doF6rsO8WoIYH4IFTOAJqkRXhDqosXSgd8dVkrPgjJuVEjld7cdZwrOp9ezXV0quA==","signatures":[{"sig":"MEUCIQCFQZjPX7TgcLCu1V7Z6NAn00CqyVQ/yhoKe8NMnvgGmQIgeXEFar1FyqY/6AxgYcWuIt1aonNRJ6fLWqZ4FL8uIes=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":290735},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string }>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"fdda3cae283fce7bd2cceae3f986a94e2e055d64","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.25.1","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.0.0-alpha.1_1683042918494_0.3857147562768417","host":"s3://npm-registry-packages"}},"4.2.0-beta.1":{"name":"@akord/akord-js","version":"4.2.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.2.0-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e12188d919e83e8f95155dc1c2d54e7ff88a8636","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.2.0-beta.1.tgz","fileCount":142,"integrity":"sha512-cLgILR2PZz3lukXIqGBm3I5p5gHEA0vmcAaV+reyjj0FEwTrUWsL+DJMnPXx3P801HAMRrhvhru4Ilzh8a2qiA==","signatures":[{"sig":"MEYCIQCbRF7+Q75XleiyPFcwhAtWZXR3ao6SWgyT2i42hv5t9gIhAO2nraJDDaC7bQqA2f7I+dhPBC9to3tWvQNVjSomsrU0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":437616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkUhbcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrX+w/+M2DWrJPRpuYa0YsYN2z4ZmzFTunPU7kNWYuSb+KeBfx/wgBb\r\nwtniqEjdIVaj3If1Elhb87h+XtpVGU1bCW1a6tFLySFOE6flUF1IEgYvIJ23\r\nXdC4i27o7OEkjY6Cd4YEUCXiTfgCiVmjijJDOowZLe+nuL7ISeoqlcrVI4gX\r\nAtv1qQgxwscQAqfv5clIUXsv3v6KMQdDtT5HtJtnu9W26TvkO1CI4TWqcUSD\r\ntavk1dPaVOpz6UhE05CQWY/tv4XWkkfU0DB8nZy4rD3nciIAy1gDS8zaM426\r\nMfplRHeQqYTQ0agh7e5MeXdk1+ORLB8XddR9AjvnbfQK1Ml1+idi5MaVMKFm\r\nGxxDv0eTN1w7ujcWFnX3rfpC1vuPvLl893oitPOe4SSJ+NyiQh4KiNbRmFJZ\r\nfRczktGzU6jqYRL28IOrNvprOP5oYxSqAimnXYpDL5N0FtHijCPVeeahBxSM\r\nWZkXxYj1kIDRoAxR09sYBsKwa9fVGiKqHgDHNo9ptlN6dpJLmQUT4vQWzdR3\r\n1aYG9KIevbwRHtjWgrIGPu967hIM/eGjiUB7ao4HNog/PyH8ikQUHO+iRehu\r\nNiFgsFvhJq5HLVjuIEWrvkAGDYDTqX8KRSys9nKMdt8oDG+rPenOxxO7hjOm\r\nNVAqjnLHocuVbJ2hC8s9XAnGMQQGw06mxog=\r\n=AP1g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"534748f7c41f06916da36617014e4a27ce094a51","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.25.1","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.2.0-beta.1_1683101404544_0.8751370929358802","host":"s3://npm-registry-packages"}},"4.1.2":{"name":"@akord/akord-js","version":"4.1.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.1.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"fb41ef475bb05084de466ce48a02271b4df13a3f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.1.2.tgz","fileCount":101,"integrity":"sha512-XUyPiP5EbW17sbr8lejKa1kqun5pKLda55ep7bnObIvnG6wRWjp8CXhZO8Sq6AW6OWSGaEzXDw8olXCsVL9cgA==","signatures":[{"sig":"MEUCIQCusfSoaK77MzTtZd0aIGfBmedvxSl7nbLlPftXD/NemwIgLWKQNpK5zag8i0vbHppxsaB5v+I/fidLvzV3qXbnGvk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":290279},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"093ab0c2d496e2374e95f631b88838c788d089cd","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.1.2_1683545783246_0.7113030906511237","host":"s3://npm-registry-packages"}},"4.1.2-beta":{"name":"@akord/akord-js","version":"4.1.2-beta","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.1.2-beta","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"dd359656850238052189cb6848a7bf13de210c6b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.1.2-beta.tgz","fileCount":101,"integrity":"sha512-4JTXxw1kSkDoYrOhWh7OpGxQp3y2J0fZ21Mx01OaTWfbqKxNcr/D8ns/3cvm1Zkw0qS9nFcg+udDrQlGij0n3g==","signatures":[{"sig":"MEQCICdgPyVhXjgsmnfWOAKqNxWw4YQTaf+l3fEiRm94fOIFAiAFC2Vi2ANJkKH/NC1DxFh8SralEXu6cIpjbOrce7X3zA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":293411},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"9ccac68953711d82df65aaebd26ddc1bea93e43e","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.1.2-beta_1683546100668_0.9603305637205388","host":"s3://npm-registry-packages"}},"4.1.2-beta.1":{"name":"@akord/akord-js","version":"4.1.2-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.1.2-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"737e847d3a133353b417501192d89990cbd239d4","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.1.2-beta.1.tgz","fileCount":101,"integrity":"sha512-b0WnCTdseM6WuFZlCBqi3mxvKWGDobQJygzWMjeOqZsmsXp7IRM2UYkicFqQ5AYQ3sPPDhF4oBpW3Hpt2fo8eQ==","signatures":[{"sig":"MEYCIQCtBdZOyDTMEzJZ+0eKl8pYZRQVxIFtNUSinkQ0jjAGwAIhAMlitqCWQ70sn/Q2acW1MCx8W+gUuzp5zQYcA9ecuh+Z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":293489},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"0e46f08d025b2b9dc1fe7f49715c1f7584ee8e48","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.1.2-beta.1_1683556753022_0.493105121628451","host":"s3://npm-registry-packages"}},"4.1.2-beta.2":{"name":"@akord/akord-js","version":"4.1.2-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.1.2-beta.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c4463e8226ed81ee2a5915840f4a8edd262bcc52","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.1.2-beta.2.tgz","fileCount":99,"integrity":"sha512-/uMnAfwr1lVdayhZGUHvNQQRwjrzfcpH6jBjRBJA/6ZB8Cy1TeitoXcio0agxcpY+FpewKaWw3dS+69KWeUc7w==","signatures":[{"sig":"MEYCIQD6Kv4xJ0nDZYaPGB768fNMkhvQCtyzd26/SGPppCZNiAIhAIH+PkGoRQ12SrB1PQ6bSOaN+yn/xnq1MWuOWgJIHBCo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282471},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"093ab0c2d496e2374e95f631b88838c788d089cd","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.1.2-beta.2_1683631063035_0.5560890110008245","host":"s3://npm-registry-packages"}},"4.1.2-beta.3":{"name":"@akord/akord-js","version":"4.1.2-beta.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.1.2-beta.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c16d1ffee71de1fe9e0d29ac6dc93c201fced9f0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.1.2-beta.3.tgz","fileCount":101,"integrity":"sha512-Zk/4gfTPDlcghtxQ6MQpOJhyuUnumRFkZ3cnOkPbvaRxry4zb5SGYtGjC8dIAZlIdrlHuhs4Td+Khhf6LEGhzQ==","signatures":[{"sig":"MEUCIQD8YFg70zX9/xrcsQzX69xepJGzS2lt5OipeK4gBK5x/gIgQT5UuVtC7O++7/WEEz80SsEqcv2LydPAG678/ryKkvI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285165},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"093ab0c2d496e2374e95f631b88838c788d089cd","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.1.2-beta.3_1683650514750_0.9591376560247664","host":"s3://npm-registry-packages"}},"4.1.2-beta.4":{"name":"@akord/akord-js","version":"4.1.2-beta.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.1.2-beta.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"398fc9ff7bc55dedbdcce7f14b78796f3eca218e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.1.2-beta.4.tgz","fileCount":101,"integrity":"sha512-ig2A53cSHiDSPcbxFqCdPAKkFGD/Du9epG8TBnlcngEn0QCNlScmjdjvFyZedd7CBVz4/TrvDSMl5XrM0F4Jyw==","signatures":[{"sig":"MEUCIAGKxMhd8vtl2km9JytNZUZHftg164+3EIX5IQBA9mqFAiEA0RyyP5p8Toyy2IcLacP2L9UForiUzQPT0zLj4vEXPjA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285860},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"093ab0c2d496e2374e95f631b88838c788d089cd","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.1.2-beta.4_1683652450511_0.7728779849331893","host":"s3://npm-registry-packages"}},"4.1.2-beta.5":{"name":"@akord/akord-js","version":"4.1.2-beta.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.1.2-beta.5","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6a0ed21eb47c6d787a6ab60027efacf7b590b78c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.1.2-beta.5.tgz","fileCount":101,"integrity":"sha512-teq2o5t7/nfz/8KJ3R6rKYEKS1QuQW1PUixvEkukwu0BqqAgeULw9bM7emnrebUb6MeAZEwUxShLdMDPhZdNSg==","signatures":[{"sig":"MEUCIBkS/SUkyi9kCF0aHzbKP0hy82phJqVUcjhX1ClOI5GGAiEAnKOaaqTih2he3z1AX1d88SzDULLvrYXT987M6tIO8xw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285881},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"093ab0c2d496e2374e95f631b88838c788d089cd","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.1.2-beta.5_1683652873616_0.992537640868927","host":"s3://npm-registry-packages"}},"4.1.3-beta.1":{"name":"@akord/akord-js","version":"4.1.3-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.1.3-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"392b5bf43c886c685af4ae2245ed51027d31b421","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.1.3-beta.1.tgz","fileCount":101,"integrity":"sha512-Hj70x99/jZTG0U1zFtmyMqJt8Yr4maMOVPhHt+3d2f0z3RPDeOeck0e7ITAQQqIf3YPu+Kw6EJD3+dFRqiTXag==","signatures":[{"sig":"MEQCIBuQAIQr7qWIUF+PPbdVty3nWmUG8aJZqD1sE4ohX7DHAiAwoPbV4sSA+kDCCkyvtP8CDyQaLQQyOapDGZbJhfmL3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285881},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"093ab0c2d496e2374e95f631b88838c788d089cd","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.1.3-beta.1_1683737512155_0.9846261548576398","host":"s3://npm-registry-packages"}},"4.3.0-beta.1":{"name":"@akord/akord-js","version":"4.3.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.3.0-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3ec331da2d8305995aecae3717fceaa3477cc874","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.3.0-beta.1.tgz","fileCount":101,"integrity":"sha512-e8tR0/MY6VAQqkLXl1c7Uz8v8WUZlbOpcJH5Ce+4m0teBZlB1DQVNXRH0acj/0o9nmOFRAuhY2/YlYweY0JYew==","signatures":[{"sig":"MEYCIQCAPK9K42Jngajsulv5wl1VqnFXFIzayCIgmwWR4vrDYQIhALNcG5wA+omOoyiQfsgaY0T+oyVn+7H+ql6XVP/iLiIY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285861},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"093ab0c2d496e2374e95f631b88838c788d089cd","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.3.0-beta.1_1683737869360_0.17779427378710566","host":"s3://npm-registry-packages"}},"4.3.0-beta.2":{"name":"@akord/akord-js","version":"4.3.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.3.0-beta.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"685be53cbb14a1a1f1612aaef0dd7dd0b673bfd1","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.3.0-beta.2.tgz","fileCount":101,"integrity":"sha512-9Ng4/JAzyvJuyRO2UWOzgB5WAqWmgqrwZx/TlsKeUGVk0oYLt41s+Bd3okiuiCURD6IKEW3qLQrQjktlDHSqrg==","signatures":[{"sig":"MEYCIQCe+KKaJWXPpLkSOufIQFlowfRooKI+Owar0qA8Y+S5EgIhAOltfKra01YBLfNPKeWSP3/QdIfHVi5Qqv7O38uZwgR9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":288460},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"47088682b14f6cb5dff90442b648ba216c7ab58d","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.3.0-beta.2_1683825205114_0.8565532079094553","host":"s3://npm-registry-packages"}},"4.3.0-beta.3":{"name":"@akord/akord-js","version":"4.3.0-beta.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.3.0-beta.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"7d99b5e2289ea9ab0389ed3d31ebb29be5d72773","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.3.0-beta.3.tgz","fileCount":101,"integrity":"sha512-gbmd8kTjaWp5qYL2fyN2SGKFljO0Lj9SkvFOJWFliUBLzKe90XHYjhBrTrdMpipy/vdpU2vTtv/amk8DbC6VRw==","signatures":[{"sig":"MEUCIQCe/+LVQ299BTlGEB3n1/6VHNeeIRojVx8o+AXB+2bk7gIgJx99lb7QQ3/0pHC7L/G3zzwICHb4mgikEe207f7mNMo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":288465},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"47088682b14f6cb5dff90442b648ba216c7ab58d","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.3.0-beta.3_1683841925055_0.32733207095477623","host":"s3://npm-registry-packages"}},"4.3.0-beta.4":{"name":"@akord/akord-js","version":"4.3.0-beta.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.3.0-beta.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"8da91dfbbf39d446eae6c1fc2cb925fdb34a314b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.3.0-beta.4.tgz","fileCount":101,"integrity":"sha512-xxusNVtzXrOG9Z9ROZzVuAsk4JN/xlJw+T1ZDvu2zu24cpboMGuC8Svsk85um3On5BqWlZgW3NSUtKB0hqxLBA==","signatures":[{"sig":"MEUCIQDdpBjrdAI68fKdGlzRiZsShpshJ3SPqEYHS+8CuD6QUgIgIRTjyxcWZ/WuXse2eILqTgXU84xFftp7QuhMqxq35EE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":288465},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"47088682b14f6cb5dff90442b648ba216c7ab58d","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.27.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.3.0-beta.4_1683897362769_0.8154888711209014","host":"s3://npm-registry-packages"}},"4.2.0":{"name":"@akord/akord-js","version":"4.2.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.2.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"db5528c001a018fd8cb56daf0fe5080a0ef4fc35","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.2.0.tgz","fileCount":101,"integrity":"sha512-Ds7cGbonmhS6R+h6zRUBSVPxxMrE4mhiV72a+tG74BgddGLGd0oSTQm0Nn83oveBrytuJRajxNuQj9NPyq0sLw==","signatures":[{"sig":"MEUCIQC+gf7l0vsoYywpnyPcCc+nIrTNTpb+Q1e9N6E77uBUuwIgKfR5P9DBZmNzNgchF02cAnweszqFoOONjdr7IltqB0s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":293406},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"7c0a2e30fd53587c5b487dc11d67e88f839a7394","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.2.0_1684228844028_0.6168915358509284","host":"s3://npm-registry-packages"}},"4.3.0":{"name":"@akord/akord-js","version":"4.3.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.3.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"431f4f595f11fcf89b8283c9d994b6ae96de1eaf","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.3.0.tgz","fileCount":101,"integrity":"sha512-Evq5OZwPBF/tyEod414PXmLWz03exK8wKdYjsPhZcsMVhwdFOjlqS26enWQED0EVIxza3fVD4pxV96Qfzej72w==","signatures":[{"sig":"MEYCIQDpSVWdvASUdzQ9bfXJUj9LnlWAClkC82MgWcSnFcy1ywIhAPZY4lLWzFoFoH6el96qka+QvEKQ4z9m4gFmka8SqsM0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294198},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"406e25f6eebb0cb048803ecf79eabe77321865b7","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.3.0_1684233397180_0.9183049980712812","host":"s3://npm-registry-packages"}},"4.4.0":{"name":"@akord/akord-js","version":"4.4.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.4.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5942984884f675fc537b84e412cc5cd2e7805575","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.4.0.tgz","fileCount":101,"integrity":"sha512-f8WkOGSJWQBQZEu0Q5PbmWO3ydDfC8OkMqM6LZz8xDDInu8WpDHLmp43xBMyMcATU8VajUbsR2kvYLOJjNt+VA==","signatures":[{"sig":"MEYCIQDHVKI9VbQ1HcGzxIwQQrlhkKjCIna6rRxOjpr5GDoY3gIhAI8d+dzhUnchReuoc/3Y6LT4pFyS7m3M98OHg+KaeOKA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295925},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"6af6e5f1d860ccc6d8861b1a6e7adf4a5d6ac30d","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.10.6","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.4.0_1684247605584_0.42902000329832934","host":"s3://npm-registry-packages"}},"4.4.1":{"name":"@akord/akord-js","version":"4.4.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.4.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"cbe0b70dd6247fdbabe265fd0b99752a4bf16f44","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.4.1.tgz","fileCount":101,"integrity":"sha512-eT/RNsRoUPpXwxKC8XRS11nE5l3oQYLwVTyCEJ3WagkGTWDi377RyxGlhZzT/P0axXHGG5noJ5xd34x4Zsstkw==","signatures":[{"sig":"MEUCIFyrvU+H7zDcojKxevmFxrBXKkG6Do0pCnlRmm2voa+YAiEAuaxEQ9VkyxYDp4MwPwD54HQZ2z4ZxtZ53g2Q2wYLEPk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295925},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"d0d01dc6af68493d8beea14e8fb3939cf0e1d466","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","pdfjs-dist":"^2.16.105","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.4.1_1684247724833_0.6157535650535164","host":"s3://npm-registry-packages"}},"4.5.0":{"name":"@akord/akord-js","version":"4.5.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.5.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9b7caf01731cbe2dcba8484e2604f5b94d2a0e3a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.5.0.tgz","fileCount":101,"integrity":"sha512-ze8oUjmruI33OVQG+tvevwlVFLCXTkAU0NOoNBnElo4BJnCvKUKTTTvDevTJ5lLRePKPleRaoDKB/YBoexbZRA==","signatures":[{"sig":"MEQCIFjfSIpGVpHCu43NcZ3P43KN7fdBTF/G+xxt+V1aAxo8AiALE1khkU3LRNZ0KTdmiNwN1WlgHURbLhzvt1ceYWzD/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":290762},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"c5699873cc15faceb9a516e60fa9a6bf22d40e2e","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.5.0_1684248776691_0.5893799433540343","host":"s3://npm-registry-packages"}},"4.5.1-beta.1":{"name":"@akord/akord-js","version":"4.5.1-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.5.1-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6e8ff095492cf0fee629d563c4fa6f8c6ef234a2","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.5.1-beta.1.tgz","fileCount":101,"integrity":"sha512-ORVM2HquAHNSo0zSetiw1SZ+y8WTVP/x6pLs+agCB9Q7pfpoSeGUbvbIDcE2MxRsGL7ZfX9wgB4kuCzHddW3YA==","signatures":[{"sig":"MEUCIE53PX/OPD2KFjcVq3L8FlCWvBAKrTtdwMBqyPIZmPcMAiEAwM8ImLbCQOi+8z9DpPQopx6xxhCKIbBJF2nS6/h4T+U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":290784},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from .\\\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - CONTRIBUTOR or VIEWER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { stackId } = await akord.stack.create(vaultId, file, \"your stack name\");\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"20a041cdebdd4d34f3001149f8c4f37d58814b24","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.5.1-beta.1_1684335201395_0.19886805608438318","host":"s3://npm-registry-packages"}},"4.6.0":{"name":"@akord/akord-js","version":"4.6.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.6.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"eb8853de578798691655c661f823a8aeacc4fce8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.6.0.tgz","fileCount":101,"integrity":"sha512-HnVEFsgw6GP/9fxl1E53pndXrPgG6UYbcHiTtaYpE/c5psTbl2n74ITHe4wmBzztAomE4b3rTDn1AcEVaaSBzQ==","signatures":[{"sig":"MEQCIDVjLN9Hu/J+si6I09bKaaUQoGF6TFZbMVsAELmUha/qAiA7FIdZpaybz5S8+xVflis4uh7BQPnAh/x0ocL2wW0gKA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":290793},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"50ff3d5b848a6680ac6d5d591c15d42438e42361","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.6.0_1684341778646_0.34033938188868196","host":"s3://npm-registry-packages"}},"4.6.1":{"name":"@akord/akord-js","version":"4.6.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.6.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b77c7301473a3a37faefb99b50b77cbea983f447","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.6.1.tgz","fileCount":101,"integrity":"sha512-5RLcS1kTRqcr/8bUxNgVASH221+IPaHRctHunnHd8PWKOOY2R1UPgiwg5+N7Or9pZT389rOQeOc+7KmtJSzzDA==","signatures":[{"sig":"MEUCIHsKli+m5Zhv2oyGZwge2cuWxMOWTx28wEw7JZQE+dCHAiEArIcMtrNLhhyhx8Gd98a7IjR510F6ReyCGvHb9N1qAPQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":290808},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"c35a947327a92144e99c5879455809796ed27920","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.26.0","blueimp-load-image":"^5.16.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1","@types/blueimp-load-image":"^5.16.0"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.6.1_1684341808777_0.5751424985677218","host":"s3://npm-registry-packages"}},"4.6.2":{"name":"@akord/akord-js","version":"4.6.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.6.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4964ed5b0f41033064f5570ec14e8ee4d4bad08b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.6.2.tgz","fileCount":101,"integrity":"sha512-tWbbuy+WN6TH3RlXF3TV8YJqbt99WrJMM1R+bjDowzLaJQSLaccuAO6zfz+rWAW0vml57JdpIolkHDSLmGNL0w==","signatures":[{"sig":"MEQCIG8HLlXvS534O/y3LgvJNK2Ghnj08KIY173igZl/yBT4AiBNGUCeWJN6AgVvLVPYfpPZu04NeA95vegUdjNo/OauHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292272},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"ac7feba82c017b5a7903aef37e73291c707ec1b8","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.26.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.6.2_1684499768427_0.30746454711387283","host":"s3://npm-registry-packages"}},"4.7.0":{"name":"@akord/akord-js","version":"4.7.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.7.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"dce23a16818d21714498eb45b960e4e9e241bfe0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.7.0.tgz","fileCount":101,"integrity":"sha512-1PYmvFlKH5hAAwQiOIT1Gb5LKLlN3WNRwa4sAIAFZmB9Nza3//I0ixz55X2/BU4oYX3fTUW65egXLxcSnroGpA==","signatures":[{"sig":"MEUCIQCbv3VlRnROTvp6vLI3h3jLlu/WW7lf2A0y2mysQbRqcgIgKgZ4q40hbUg5ATu99R4/DW1DGZBdDSDYmxRsvTaTpe4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":290165},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"9f8852ff8af4b2078464d1872b6f28fac7c8630f","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.26.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.7.0_1684499924426_0.5522329263521777","host":"s3://npm-registry-packages"}},"4.8.0":{"name":"@akord/akord-js","version":"4.8.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.8.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"74f454407b2fc9c0fcadd10c74a7b40b0d928c07","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.8.0.tgz","fileCount":101,"integrity":"sha512-9U3YgA/jA+orjd68Le3IuILWce2OTJDXtPoslLevWPcs7KLVz6nwsnAvFwaDOyY3AEu6ZVmgfnytxo550ttBqg==","signatures":[{"sig":"MEYCIQCdCK1lKepgCG6ypt/2dpGEP/WYhSuLmlkxPXOfflWXdwIhAJTQLdUCMdZIhj2zj2IDA5kCs5sGNH34qadCyH8LMfzy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294391},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"401c574635d3646d5aa1be98aa0395f595086a5b","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.26.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.8.0_1684753208847_0.9575657616883104","host":"s3://npm-registry-packages"}},"4.9.0":{"name":"@akord/akord-js","version":"4.9.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.9.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bdf049d29f6d036ab53d89317a0814aa7ea33c16","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.9.0.tgz","fileCount":101,"integrity":"sha512-MZ06F08jrIpwUwGGmzxS+Q9FNvL6XzYq7ka9he9iUijhZtQWt6LflgTGK223gCv8B0BXJ6hzJGyCr8tH21Ichw==","signatures":[{"sig":"MEUCIQDQvjZzEOxcEZB1xg8zsrcrbkkJCvPjLjSJDVGKo568gAIgDr02OSnaC0T9gr1Q6Vram8gL5mzHLCAARl7YvSbYQS0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297274},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"dafd7add637b6be59d5ff7f7f8e08397e65d18bf","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.26.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.9.0_1684760341348_0.088637694581023","host":"s3://npm-registry-packages"}},"4.9.1":{"name":"@akord/akord-js","version":"4.9.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.9.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c0a193af908aff360a1b1345d6a5635679f5b717","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.9.1.tgz","fileCount":101,"integrity":"sha512-jj56plBlvlWYpMDPaS7el9PkM7yTijxVtMzKTeJNPflI20cdiTPrPTSXUyWdI5kV2xaB2XJya9LBayZSewBqHA==","signatures":[{"sig":"MEYCIQCj9amnwJ9gflCSl0gK+4E9rBwxvTzGQg/J4qrFxOCt2AIhAMhk7oXtv4daKQdqiiztQCScgSVFA02GRJv0sWKsJXDc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297274},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"5372c014f9cdf6879e5cb83d70778866096adf36","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.27.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.9.1_1685017572675_0.6316360431138079","host":"s3://npm-registry-packages"}},"4.10.0":{"name":"@akord/akord-js","version":"4.10.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.10.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"998c9d0e0187247479d3d0214b74b64b19189e9b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.10.0.tgz","fileCount":101,"integrity":"sha512-L60QUlvO/l3YMpUcRmr+5GZLD8RJaLd0PQDu+2CvZ1dRwfcgpYj2K8Jhr1TkhdCmMuCsynUHRg51j9dfGpimew==","signatures":[{"sig":"MEUCICbRrYPJewz1ut90Eys1sIc3ynSUmT4abazvT2ZuLwhkAiEA2j+tilsg0NSXl2sdLh36RcweAMJLMR8eeOnIAhyKoEw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296310},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"be5d268940b6d1a49f3e62bfe3ef78ac92473f8c","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.27.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.10.0_1685029647843_0.5497300318792318","host":"s3://npm-registry-packages"}},"4.10.1":{"name":"@akord/akord-js","version":"4.10.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.10.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"51c46777ab1fb5ae53245b41a0c0249438ba5703","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.10.1.tgz","fileCount":101,"integrity":"sha512-ffgdVeZ4MToTBo+9a8RsvFt/HRlemTjC2Ormo2JLPuMqhJ4E9hITaYY0rj6hsg1uQFpC1t1exmzsAZsMKmJYwg==","signatures":[{"sig":"MEUCICZ+Cq9jgPhPLAK/02lEtRzUG5KtMk33XaYmES66qCUYAiEA8dIVZ95IlJBi0QamLh0i3nZVEmv9VFYiNdj+CgdZA2w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296203},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"8b77e87034c3f0da48d9831d7849b6917ca85464","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.27.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.10.1_1685042662175_0.3388243721024138","host":"s3://npm-registry-packages"}},"4.11.0-alfa.0":{"name":"@akord/akord-js","version":"4.11.0-alfa.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.11.0-alfa.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"18453144f9d4ac31f5375915da6dc686d8cb62d7","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.11.0-alfa.0.tgz","fileCount":101,"integrity":"sha512-w4eblWn6n8Ml0PALp1fjwlCO+LGFMwAvX+Wz8vm9ML80fzYpOcB4/IIwGG6z4EbTexovKtQWSsgWQ3GnUS8yBQ==","signatures":[{"sig":"MEUCIHqYzZdjW1Z0Y1Zx2pd5KKPS/NTt3Pbv7UGLcgfY9eefAiEAifnSUhm7diTv7uwbNYN4EzwwUlicdjZ9a97ZohLPFOY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296712},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"013f0bfd001a6eea519e7e5dab03c783ca153758","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.27.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.11.0-alfa.0_1685103305884_0.9880865556649323","host":"s3://npm-registry-packages"}},"4.11.0-alfa.1":{"name":"@akord/akord-js","version":"4.11.0-alfa.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.11.0-alfa.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"7b15ab58e0a601ce6a503e7e190d48583ac53e18","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.11.0-alfa.1.tgz","fileCount":101,"integrity":"sha512-P+wE1tNwObWH9ym74MHgJIA3ahFbKqmblC4bq+E5fYq/+DtPRHg/BiLDX/avh8H0S0Ly+Va1wxSuM9o1q6AX0A==","signatures":[{"sig":"MEUCIFxR0gxB/XOQOR/Iv2I7bi46lWJ6TlS7MkuJe+5BZ6qUAiEApyqijEj0x1QcksDuzM/xZdp1TWhjzXmD/veVnkaGZHs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296422},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"fc7c36d21ff2e2f2ad65dfb98082a2a36bcd1cb7","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.27.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.11.0-alfa.1_1685198996227_0.36070243918167244","host":"s3://npm-registry-packages"}},"4.10.2":{"name":"@akord/akord-js","version":"4.10.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.10.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c599930cd05ae32130b7974dd1b5ebc29c14305a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.10.2.tgz","fileCount":101,"integrity":"sha512-jSdN+abn6ZD4NKCfT4SoBFe6zXZE9116PgO9UTcs7KelFqmt13sRFUU06Sar7k423SDTtyyDXGhToNYVdQuYiw==","signatures":[{"sig":"MEUCIF4H721VuOzgYGFuf3WAUkCBMWV3sJS6z4TUpR60irMHAiEA7LvCIEZxyn3ypTc2h86Qihw28XlP0tVXlaVEQK6mUEc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296415},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"fdb6c8a7dbfaf69d6cab433c2ea0899531f71cea","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.27.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.10.2_1685450696728_0.29411252088484074","host":"s3://npm-registry-packages"}},"4.10.3":{"name":"@akord/akord-js","version":"4.10.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.10.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ec13539453a8b95bbfd2434176b1425e2ccb6ede","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.10.3.tgz","fileCount":101,"integrity":"sha512-fmTo1UDdBAr/FcfUUBqlHD6DQ9ciAt0afxlxJHxQC8V1/fw1ajsmZrsjPhxeTYc9BLAPf7a24hQJty88BwLsJg==","signatures":[{"sig":"MEUCIQCCdFSU8z/moe8sAyHHsHTpjHvzeo0SADyoE6xXCqqBpQIgNU/vcKII5gmJV5g0iNoPEOz+H8ktQ6pVagoN7U2GYdI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296674},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"2694ea4cf6229783bd726b611338a1c594f7ee45","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.27.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.10.3_1685605988754_0.8922389366735819","host":"s3://npm-registry-packages"}},"4.10.4":{"name":"@akord/akord-js","version":"4.10.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.10.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d21254d75b348f43664ae77b92197bfd3e722580","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.10.4.tgz","fileCount":101,"integrity":"sha512-dQPJKKJhnlHfPIKVVOjeZAhldKDwxtYGuHHxhAF2nWayBg8ZcQ0h8mdb8yoiekOtoVNojGQ7pf8/HOAsvUTwJg==","signatures":[{"sig":"MEUCIQCHOiFDLOdkZfxW1AAHQBuqq5WzxN4pccCBTTjbJr3T8QIgDHnP2GLuTaOSV+okayuYI7ioyXZ0DZIn/PAC100gwe4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296648},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"07800a93e25212fa8a22aa35dc1f94eb6511b08f","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.27.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.10.4_1685620817869_0.3687920081047307","host":"s3://npm-registry-packages"}},"4.11.0":{"name":"@akord/akord-js","version":"4.11.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.11.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c9a13fa652965c990a5d831e2e27992b7e2826cd","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.11.0.tgz","fileCount":101,"integrity":"sha512-XGTgUsCeJDgfceUFbUZaQLTeiLFBE92/pn6TdzK1Tl4YnRdGUoz9aCISfbWFDcZdLLm5rgwnifoxM6VgaS4/iQ==","signatures":[{"sig":"MEUCIQC5/6pY82ogtPpsWpMQBh/Zueqpx6EtXKk/RtwavRfYtgIgE5TY04vMXIAlgBPzAzqBDw8PXad5FeZBaUOVQOEWVsY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296881},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"d694de8b34a32be186c02bdf59dce2706d3e0b7d","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.27.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.11.0_1685957661458_0.8372038456818025","host":"s3://npm-registry-packages"}},"4.11.1":{"name":"@akord/akord-js","version":"4.11.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.11.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bee2e48747c0ad093597b0b19a251b5cdce9e55c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.11.1.tgz","fileCount":101,"integrity":"sha512-67xEmwwabWD1xnSxdbLEaBp7Ihdsdse1rFHrWY1wKH1J6yydjfSQrT016L4+Rw5OYNYO4IoIYDdkZxf5rMoHqg==","signatures":[{"sig":"MEUCIQDZIjdNqRJmc9F9KKYc17DLTXE2CWKkCC8KsvDVpEJ63gIgfJkd4AtZPE3F7bJDWxoHiDdnvjwTLECEyerg+sp8L1c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297175},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"7176431e631e4cf03d9230e837751dc58108b694","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.11.1_1686044545123_0.6918344100130451","host":"s3://npm-registry-packages"}},"4.12.0":{"name":"@akord/akord-js","version":"4.12.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.12.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"eb3058d9313985e30255e8a573c4ea5edb699801","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.12.0.tgz","fileCount":101,"integrity":"sha512-vZflCUM9LbhmUQTpBDXscOZolP0pMGry3kKDlBJpnR6N7v/UUrhbmSpRN2EDsB4se60nvzyd6opDB+LwqKYPNQ==","signatures":[{"sig":"MEUCIDPCzxEncdYfZeaTlNYhwUUPbdY18VTJTr+U8PGGeyW9AiEAp/Y74tFA7zSfspNVCAmG/upz9aNo0LeSnWfdCmLHpqE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297168},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"578c548947b2119a179df8e0e087bf9b17e99230","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.12.0_1686131991025_0.03833290202762307","host":"s3://npm-registry-packages"}},"4.12.1":{"name":"@akord/akord-js","version":"4.12.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.12.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"779fb556dbd3383b4e13f3ca98594c5719229bbb","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.12.1.tgz","fileCount":101,"integrity":"sha512-B41B8EjZScBU2610TEqXjBmxwjILeFbJN4sx4nAfVlspEhvfmV1QWlpqoXqQl2QqwzgcATZ2VUHqsSNIWqTDOQ==","signatures":[{"sig":"MEYCIQDU414/PsGrINkJPH/dPfuuURLPHW1+szipAce5Kc/zSgIhANwqTmKED2qZ1jOJxPPF9wXb8E9v3y1rFM+u5cV6hujS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296951},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"433c57597bb157983f8048298dc9edc5276c43b7","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.12.1_1686676232041_0.9279992706405382","host":"s3://npm-registry-packages"}},"4.13.0":{"name":"@akord/akord-js","version":"4.13.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.13.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"124c30e3f0cd3af9730a53f93da888c701433992","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.13.0.tgz","fileCount":101,"integrity":"sha512-jOkZh1javjaWd7FM6Ez4coyWCxStLnqlBaE3zGpXoR1MneHt2WjPcgJP/l+SZkX09PUNnRmLeWYpJFJUGLdnEA==","signatures":[{"sig":"MEYCIQCjsTXyaXY5k6THcAXMWistNgr6saVE4AMKd0GXXzqiBAIhAPybqgYjh3NReo2ae9PHweT2fTM2I2hRUNiMWX8x2m1k","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":298986},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"5bd5526c5afe144f6c570401814bc8f58347a80b","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.13.0_1686751519747_0.12322182536156956","host":"s3://npm-registry-packages"}},"4.13.1":{"name":"@akord/akord-js","version":"4.13.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.13.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d44ce662b35717381828ab3e5aaf4495d24525b1","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.13.1.tgz","fileCount":101,"integrity":"sha512-i2tH7BW8vs3sMAkFgqYYdXAZ8CSuVtFRoEe9tRrm036yPXg8tX4LEk9n7Prxx9oArdf3fwTwTWc+k6PoDyXg7w==","signatures":[{"sig":"MEQCIFmgB7Hu/TCZAh0C+zgGwGChUTjaIgjaPuffsLboQQVqAiAaW/wi123225P8C4yrjMgrqcprsehA+Xn8pDAebG0bXg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":298995},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"4a67f72233345b258a207bef75db73c7b9b9a23f","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.13.1_1686763080783_0.506655677309148","host":"s3://npm-registry-packages"}},"4.13.2":{"name":"@akord/akord-js","version":"4.13.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.13.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"46b5303c9970a4cb174df553d9e101d19eefa59b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.13.2.tgz","fileCount":101,"integrity":"sha512-rvnuvGrpeTmjqoJA5g8sUy+YTEPAbISil/1Lkpxu5q7OGNTJ2iFElmlFn3kcaF1ur6QVk+8oUrcLDQT+78Y9+g==","signatures":[{"sig":"MEUCIQDEYQ9iOQictKlfcxihmwdFbw7QHeZ7cj8JeY7dmMSJcQIgUARDYRwJSjwgzsnnOHhgIgEn7V99HhZskxBZdnz2ED4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":298963},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"9d3582841d52598572fd672e2caec8cf1a22f3cc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.13.2_1687178839105_0.7470986800300052","host":"s3://npm-registry-packages"}},"4.13.0-beta.0":{"name":"@akord/akord-js","version":"4.13.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.13.0-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"11e9145799d3fcb2a0e8cb772816108ebe9b9757","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.13.0-beta.0.tgz","fileCount":111,"integrity":"sha512-qOUT40V0pO4M70S9RrVYbw9SPqnLFD10kLSErYIcdQ8p/NbwH03dgtS9kBJqfTosEpEB2+c8lHlQW3SMFDs10Q==","signatures":[{"sig":"MEYCIQC60CbFqr5aCtGruspnRwfasHbRIA3cgU+evNYqMtAGjgIhALvjbM7Pqbcj4Lkm/KBpI18alu+HSHa4eY6sA3QMNmg+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":302569},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageClass`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c40247fa0cc3b9eca702123b237f23d4e3883ac8","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.13.0-beta.0_1687521669709_0.6667168702481852","host":"s3://npm-registry-packages"}},"4.13.0-beta.1":{"name":"@akord/akord-js","version":"4.13.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.13.0-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3930d0e7a5fc453a456dc99ede9cda69dbe2c207","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.13.0-beta.1.tgz","fileCount":113,"integrity":"sha512-uHUSseLsneZXbSVovjTiLkppgGDb/JBDeN1Zaba32yTZlw2EHFtLV7zYlkboidSd4kuFVHaoFe7IIhxCynKlgw==","signatures":[{"sig":"MEQCIH5gk3/RrbL4KRYXkuRyx93GQCQ6dz/9TrWCvVeqwrooAiAy8GYwxe6E8dIkbXwzC8fhDEjNLUyzrljC0ICGN4FtFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":302790},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageClass`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c40247fa0cc3b9eca702123b237f23d4e3883ac8","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.13.0-beta.1_1687522791651_0.6105193422568584","host":"s3://npm-registry-packages"}},"4.13.0-beta.2":{"name":"@akord/akord-js","version":"4.13.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.13.0-beta.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3c3487f8d83eb952dc8e9e5b6e2e4b019af6b259","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.13.0-beta.2.tgz","fileCount":113,"integrity":"sha512-8n3oKp/yLl5gjI6YfdLKSGRubtecAs2hFguHzYINc/3/+wnVW6LS6qSDm6Rk8O3FaySf87IGC2url+fJ5xoTEA==","signatures":[{"sig":"MEQCIC6XWTnECFaKU5lUtnyg8xdj9KqycHWYcBh/4MKQI6FhAiANBcxUriidQxLB5Pcwye6zHZJIh1Q5QnA0AiHm29jhaQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":303134},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageClass`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"fd16adeb362d58b890cf432eec6f42e9c9d76e88","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.13.0-beta.2_1687524576066_0.817822149368461","host":"s3://npm-registry-packages"}},"4.14.0":{"name":"@akord/akord-js","version":"4.14.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.14.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b4153409315dfb62dad888b6e9a7bd11893b3c67","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.14.0.tgz","fileCount":101,"integrity":"sha512-x41vsEf6XyEohMz4AtZUE/3jPezbfz/rAU1uoHRRlwtX2dA4Hm55lsT4D7uHMo3wU+QDPLGSdlcIKbpxbyqc0g==","signatures":[{"sig":"MEUCIC3CwH4s4JpQTO0FW2AMxDuWaFCcRZKUWI6kH7+IkeA9AiEA7bovjR1KEHe6F79V3+CCShAc6j/qd7aUo9M7l4qpA1Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299039},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"566707d01454e4e4676bbd6c103e685e0425cbb0","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.14.0_1688466881499_0.7545409373577765","host":"s3://npm-registry-packages"}},"4.15.0":{"name":"@akord/akord-js","version":"4.15.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.15.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"7f468aa36cbf8020b752b75761f60e80c25b115a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.15.0.tgz","fileCount":101,"integrity":"sha512-YcKMmV44hxSHOPsEkCOdvka2bw7IsPuKpkrzd78EE1GLufbow5gtEDtojuMT1pghhU9RPlPLBEEKeJ2J2sw4BA==","signatures":[{"sig":"MEUCIHLAwQRsAhZs+HTMZWmV1zZvnU3QU1Frzo+hDnUbt+BkAiEAzokAeozqJQwuOdsXnQzGjZkw2AjEFPFzBqL1GswlpUA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299115},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"feb87ccc3b6c1953ef01fefb67b23fd5f41fcf05","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.15.0_1688468083961_0.4813347382345825","host":"s3://npm-registry-packages"}},"4.16.0-beta":{"name":"@akord/akord-js","version":"4.16.0-beta","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.16.0-beta","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"74db5dafe67c5968047704e30824a6a8c75edd41","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.16.0-beta.tgz","fileCount":101,"integrity":"sha512-cuzq54xhNUnRcPeXlh7/Mx/T7qPcm00UuvAosBj9MU8lwGfjlWqjGdj6ker4LAAri7VEbiFm1NPqSLBnhAa+sQ==","signatures":[{"sig":"MEUCIQCEUhH1fhQrs3Xjdzs2O0y+SU2S6GXBZxNVb6goIMqZPAIgMccxR2zBTB61r1pPMZf5p4hlu8f6tiRLCZEJHa9V2ZQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":298979},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"a3dde2c74fd6da9843a064e09bdd1ec3c7863537","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.16.0-beta_1689091174101_0.4888540865582305","host":"s3://npm-registry-packages"}},"4.15.1":{"name":"@akord/akord-js","version":"4.15.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.15.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a47eda6dff96106790881b550c2913cf1f00f506","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.15.1.tgz","fileCount":101,"integrity":"sha512-Dk+UaOam+OAZ+UnkOzuL2Agj8cqhvmOOZTU1XWZqLV2TLFQ9HWEPxCdoIIIOxU72ZRw1XPi2BzRPoDzxmJSiIA==","signatures":[{"sig":"MEQCIHaOQC2rGDjynCCmtJbM+UO6pqbRV0AlXJZ/+BjvxgBGAiAnmesXDCmhgkYgkSkBxFi7UwnoWpky/MVYYziYOLlseg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":298974},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"ca7c332277184d1c86bd2467083985b034ffd726","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.15.1_1689157178523_0.6109654933251321","host":"s3://npm-registry-packages"}},"4.16.0-beta.0":{"name":"@akord/akord-js","version":"4.16.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.16.0-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"62d52aadf20be0560defcb77e47fcd75b84611ec","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.16.0-beta.0.tgz","fileCount":111,"integrity":"sha512-9cnCEIRLotoHEWE1/qsIDehKiQNVCc3/PWuoRObPOx2qGfKKcTddHQd4alOnhuGA/VnrpfzGP3sThielAGDQTg==","signatures":[{"sig":"MEUCIHqRw8Hg4dKttjV2hp8gc+6oPIS45ogZ4yIxjcbipTYKAiEAihWFRXyHQAfwNSNps53+swo2PICDqpgHHUR8VNM76RI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":302876},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageClass`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"abaaaa36f4ab52c757dd11909d9eebe9a190552b","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.16.0-beta.0_1689172721361_0.0383447286272518","host":"s3://npm-registry-packages"}},"4.16.0":{"name":"@akord/akord-js","version":"4.16.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.16.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ff103ff25990a3b72a3c9a504416060e8414b146","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.16.0.tgz","fileCount":101,"integrity":"sha512-95ckSoi28RR7varSX9rO7OuTJcE6tmGOU7K120Si2v1Jhw/ZNtKNuGPdm7ODFyVmr0pQuFCmrBeOuiF5UphCGg==","signatures":[{"sig":"MEUCIQCn3YHVDML8y4sgE0euWlTIgM/zAL73h/1tW/j8sXZLGQIgNpw+Rp6RCEcbSO8k0X3Ec57dBnA7iARk2PkY4BzG6yE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299025},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"d2a5a7d1b2d3aa2f8eaa5549443579f4c9396dc9","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.16.0_1689244568726_0.816935039565573","host":"s3://npm-registry-packages"}},"4.16.1":{"name":"@akord/akord-js","version":"4.16.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.16.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5dc040b02f284a41a4621957757aa4f285d27ed2","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.16.1.tgz","fileCount":101,"integrity":"sha512-Y92XHgzMJNGrNgbsDo6pZs7Le/O+qbmwMiax7gztSZRiqQUfsrLawmqVdxeQN8HLu+aOm5uLwVEHhnlbb+dwKg==","signatures":[{"sig":"MEUCIB42FtZJVHupT5JG+FO4Ha285loqOg/jh3kSDo+4uvHjAiEAzMILHKntPm2vMM0T8UKnsVLTU12MoXtdE6pVP1qfCa0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299095},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"b158df2bce34a9204cae0139e6aabb605b6fc2b7","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.16.1_1689428223515_0.04041059436254413","host":"s3://npm-registry-packages"}},"4.16.0-beta.1":{"name":"@akord/akord-js","version":"4.16.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.16.0-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"07feec8869624974a5ef0eb54b4376d3463c1f46","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.16.0-beta.1.tgz","fileCount":111,"integrity":"sha512-BDsmaNLLW9tY1G4YS2wU/redbuKsZxdxSQGLGjR9SyiwdwAhQ718Rx6oM2SZI98sqonBDh5rcVkcyWq7R9Luwg==","signatures":[{"sig":"MEQCIDnVCY8qELwIIPObC24P5/KC6Gfrdo6Ukp9GHDftYEuJAiAt5a7yM9NARwzLYw+GO74PT6kImIT7KyY3x6DWJCJvxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":302906},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageClass`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"abaaaa36f4ab52c757dd11909d9eebe9a190552b","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.16.0-beta.1_1689679075021_0.4043760889224275","host":"s3://npm-registry-packages"}},"4.16.0-beta.2":{"name":"@akord/akord-js","version":"4.16.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.16.0-beta.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"697c5f30894cdaa32d9c9edda64721d98d6c605f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.16.0-beta.2.tgz","fileCount":111,"integrity":"sha512-COT6MSr1A85/skxl9SkdHkgoWv9R0mZN3/l5ZvSBpoko06Z3mwi0hSFGL+57uGv0pLBgDcxa8UTakUVTKUkLMA==","signatures":[{"sig":"MEQCIChhGZnW61a1NRtDj2DL9NG4MULHT0rH9HHWSHhcbxLkAiBEfCECTat7XJoXZFhw32BkrdyUJrwaAd2KpCo+7mEL1Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":302872},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c5f74111bc3cb633cd05e0af5aa574d326789bdd","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.16.0-beta.2_1689679594799_0.8229031545421184","host":"s3://npm-registry-packages"}},"4.16.1-beta.0":{"name":"@akord/akord-js","version":"4.16.1-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.16.1-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"531ebd02d42a9f01ee1e652340fc7d0e4acf1e8c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.16.1-beta.0.tgz","fileCount":111,"integrity":"sha512-9yhEi3p6B8rPaSStNH7pZiE5PC5au7W5otzEDKU68zVIjCcF0ttpdSH7dlYEfpwQ237xdwi8IS+iwhmFKtbBQA==","signatures":[{"sig":"MEUCIQDsU6JQIqTlG5hc8nORGQ6awl0LOV7X1Ediv3neToAZFAIgDZqbbq0kzY2TPkCxzguC9fv2bEm5EwLMT0HJhG5c8BM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310001},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"1ea6b530b0f1c2a6d99d1ecc9f4bf4714ee24082","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.16.1-beta.0_1689867379433_0.7647248171474776","host":"s3://npm-registry-packages"}},"4.16.2-beta.0":{"name":"@akord/akord-js","version":"4.16.2-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.16.2-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9537b08b1b9512a51028c5983dbd9730038f89ad","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.16.2-beta.0.tgz","fileCount":99,"integrity":"sha512-5sdPjGnkOh97wc+Pt0lINCS8itSjfXhpioNvb5L6bR6/tYymeVqyF3ArN0jtOCVJEwM+8nobHuDHanghUxNriw==","signatures":[{"sig":"MEQCIE/exImQx5DHJQ8UsCItHmIgPYm262aLl3ZRjFhw/2UhAiB3VBKHWbN5mVmpzqPjcO0l/Y6EO12Kw77vO+PgzYKa3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305833},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"b09b643733a8954890c6a71a242bcaeb6b97e5bb","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.16.2-beta.0_1690640187216_0.3721456723536958","host":"s3://npm-registry-packages"}},"4.17.0":{"name":"@akord/akord-js","version":"4.17.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.17.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"778a3f9b73efeae3e5ce876e8e09502e61b9a46c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.17.0.tgz","fileCount":101,"integrity":"sha512-F+fu3TlA+t5sONjDbal5XXUtAxKCUdoq7P0DsnYaVx8oaOsbc3LGQDYziLdfwAOJB3+mP6nCMcWi4uEXNeeYeg==","signatures":[{"sig":"MEUCIFaxhenDuvzFF4sKZzvSxuqq4isLUSDzi9Sm/nvNpyomAiEAo+vZpqSI44QTJialgwkVbBJFpUdggBVwaH0bjg4ndIU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299218},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"90e361c1a9beda4f584dff03124884ff8e46b4a6","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.17.0_1690990130074_0.06490072944898051","host":"s3://npm-registry-packages"}},"4.18.0":{"name":"@akord/akord-js","version":"4.18.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.18.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a3bfa4062f042e4e20f3a005c69bdc78cf0144e0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.18.0.tgz","fileCount":99,"integrity":"sha512-zn8WfdjcdkRu3gZcSbW5RggCj0QQGiRsF8TxyVGb9N3BkE1Y5uMTTngzi5CKnkrykHkfJcfRHorImwYOoK4TlQ==","signatures":[{"sig":"MEUCIAXCy50RGzZF1/XySk/B3qIStRcQB7oZsp1GlfS4gAdJAiEAomanO6W+kmuRfg95ahJfQIweKSQ+JwydNYQPBxzjl6s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305907},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"c0ca0436c93daa1978f83e78598998d248067189","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.18.0_1691051878122_0.7734300165198269","host":"s3://npm-registry-packages"}},"4.18.0-beta.0":{"name":"@akord/akord-js","version":"4.18.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.18.0-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"904de332986940b5c8f57670bf192401f902dde6","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.18.0-beta.0.tgz","fileCount":99,"integrity":"sha512-bTX2EivesyCha7sfcWutwvOcXZfSjBh0aYAHlZSvQKMNJJawDWvlvlUPHKGWEK3ue+koSwELzfsw4BztMfpvtA==","signatures":[{"sig":"MEQCIFSV/TfC4iBj0XpAhNu6dH4NPdpaRTbUVumbVjt+GbhnAiAe2VLmlWXwSj5dilgPtTYOA9tiZCGZPRbDQeBzF1AH3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305710},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c0ca0436c93daa1978f83e78598998d248067189","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.18.0-beta.0_1691073561469_0.8019642200894106","host":"s3://npm-registry-packages"}},"4.19.0-beta.0":{"name":"@akord/akord-js","version":"4.19.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.19.0-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d92d36b92e0e0e95135b6722538acc64a9ee49a7","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.19.0-beta.0.tgz","fileCount":99,"integrity":"sha512-TSnD00Dk26mScBPF8YGGONtFygvzm37ErVGKX5S+bFV3aSqN9vR1usOyf46i65Wz0hj6nfATpL1Qh+za9er1GQ==","signatures":[{"sig":"MEUCIDXU67gq7F1e2r58IiOUjPwxFzSrEnxR7Ji78MV8l5QwAiEA6MduhmlzmI9dux+EV21wtpx8L4/6nYREyHjnsbOHwBM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":309128},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"e52247b558d3ea7c889b15d5d51e7686a4f06fea","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.19.0-beta.0_1691598386201_0.5490102468722373","host":"s3://npm-registry-packages"}},"4.19.0-beta.1":{"name":"@akord/akord-js","version":"4.19.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.19.0-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e76e6bee0f4a05aa6dd6e62b6917e8c479c978a9","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.19.0-beta.1.tgz","fileCount":99,"integrity":"sha512-q4Mp4sNicyv6jRz43ekCHlD6LGi5kr5SS3p2cDMij+jgjSu7Wh04xwS21l25GzNF02mzVFb/IqFCf8hvB+KWWw==","signatures":[{"sig":"MEUCIQDrehGRm5KVtUqLgbeWKG8ZTMFGqdnJkClfCkoSrVWLWgIgVqacZiMYRkbSnJ76WsjJ9yJh9z/Dc1enRjCGJHlAX6w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":309134},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"24c10da10201f0c369de18cc436f0a65c91bb628","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.19.0-beta.1_1691599598408_0.5674152443543345","host":"s3://npm-registry-packages"}},"4.19.0-beta.2":{"name":"@akord/akord-js","version":"4.19.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.19.0-beta.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ed679d34b93b597d3189138f8e4fd5ee6f33dcd1","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.19.0-beta.2.tgz","fileCount":101,"integrity":"sha512-vGBPWnewz6dAKLEsTykG9Dq+WT+5bX3dTuiKxMMiSIUWuQnvCGNkaRXtTYNL6XqNXw1qar1u36JsTFUEcfeRgQ==","signatures":[{"sig":"MEQCIH7c0Lvo2tNxTsiFum2/zJSEbnWFjYxTTrXhC5fAH3p7AiBpeQGV+ejzFfxaV/fJssqeLVvnBVZ4b44T3TZAJfA9SA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310365},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"454cd8f20b5620fcee8fd496e8b4cfbd6c412ce4","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.19.0-beta.2_1692615025987_0.20142714976691867","host":"s3://npm-registry-packages"}},"4.18.1":{"name":"@akord/akord-js","version":"4.18.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.18.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"da74df9a7723a5caceb3895100dac0a271beb6af","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.18.1.tgz","fileCount":101,"integrity":"sha512-CqTjOQItdekRsNqCb9WHiPslV41hbXRY62hchffdm6rJGZcIpT/3UgVAxTuqiOEVZ71POwhUzju5+fKMQH7+/g==","signatures":[{"sig":"MEYCIQCiYD3ntknITkPpkbNvjeBMSDXfXDgy1YB+V67HaEvStgIhAJLaBJGUvofj1GeXHdU6dBYUC09nptz2tiETM1gN2GU8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310358},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"97050d43672054e15868c1924da2c67c7963c880","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.18.1_1692705048586_0.9690898951520008","host":"s3://npm-registry-packages"}},"4.19.0-beta.3":{"name":"@akord/akord-js","version":"4.19.0-beta.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.19.0-beta.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b53a74b673d50189e269d8c74685752ec2f128d0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.19.0-beta.3.tgz","fileCount":111,"integrity":"sha512-Gpp/W5qR9ZknVLIVHJNejisWgPKKteT4g6w0m6+PzofiOtYJD4tL5yx/zRZLlqJZ/3sPiD9ECFF++uxt1Ln6KA==","signatures":[{"sig":"MEYCIQDnOjwFFjC46Mnd5NnUCR3b601L4qvIz6b0SDgnilIADwIhAKbLvIqMPXwqg+EoITtonnpwkZ12PadtC6vB4lz9b+FI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":309955},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"1ea6b530b0f1c2a6d99d1ecc9f4bf4714ee24082","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.19.0-beta.3_1692716292738_0.48044304592240894","host":"s3://npm-registry-packages"}},"4.18.2":{"name":"@akord/akord-js","version":"4.18.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.18.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5f6d2b4b9aa58a90fade310a0d42e13a86654de7","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.18.2.tgz","fileCount":101,"integrity":"sha512-bIGM6haWqvFvK6OF7uTQ9dnyZEyehbN0HcZZLuAxMvlcUQFydp9RV8LZsXAu5PZFAEUNza7sx2VsQNg5YsTjFg==","signatures":[{"sig":"MEYCIQD3ZG7TKqJIKssmDWegXW/u7GrebX02+GLW6lzxIAUweQIhALmcZXzW/TRC/LptwJCrlQ390U80WJ1V0bm5YrkVTxZl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310494},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"c19a6d7e742aac4fe1ff1bd1a51f01409cd8c75d","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.18.2_1692968511582_0.6891385240500625","host":"s3://npm-registry-packages"}},"4.18.3":{"name":"@akord/akord-js","version":"4.18.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.18.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"40d5460fe3225d0257fe2b71192a7bdebc2d1bf8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.18.3.tgz","fileCount":101,"integrity":"sha512-xRg8FD6rouEgIgF73XW8Y5EU+vfeDGtWJi5kCZuR7dGz4VHkgyt3XJ067LLcaizRI1cUsTkT+iXC6ubXnXFJfA==","signatures":[{"sig":"MEYCIQDxupRelqxeYAY19qC5vIRXuda4WUfgrr6Ic438TwpkZQIhAKUbPFXJ2kqomm/pxhu60qV86LR1shYn0cSsA/Sr+QvB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310377},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"31be9fde796488a2794c6b76f9b8b73b44a17b09","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.18.3_1693386238181_0.015267147665123826","host":"s3://npm-registry-packages"}},"4.19.1-beta.0":{"name":"@akord/akord-js","version":"4.19.1-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.19.1-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3a8bcbe6b14d09d3e66583e7894f2447a91f2ec7","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.19.1-beta.0.tgz","fileCount":105,"integrity":"sha512-u66FOSrw7NaXJ4lfn5EE1NHEkn20rROOUsbrnXhDTm7+YjR7dOHLNhMAJGZhQILWXKxG4cn78W51V6XBRbOLlQ==","signatures":[{"sig":"MEQCIBBe68+tl4vDtKqKo6scjame4oFz0Q+RcDNwrZSzSdAmAiBwVriYPEPGrV0n5ayzEP3wY3FQR3MEiJ5Rm7MUOCuaCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":316343},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"be03621fddc7edc512c815a81f954d9e0850f730","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.19.1-beta.0_1693562380060_0.24766064224248652","host":"s3://npm-registry-packages"}},"4.18.4":{"name":"@akord/akord-js","version":"4.18.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.18.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"30db3dcacde28fab5ac731678e2f00ba625f3e6c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.18.4.tgz","fileCount":101,"integrity":"sha512-hGsiWYqNRypc39lbNtb8+SHrWuk8kAixspyGn9c5o2rUjNDkAAGv6HCwzqEVIdrLEof1usMOnzkYNf66mJYahQ==","signatures":[{"sig":"MEUCIB60LgnoeGBEGhI1mf4vtN2zJjYjQHwQEoqNHJKz9vcqAiEA1M+kSWpwgsUFlVIp073T7wBnRjjuJv8zXh5pP42kT8M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310205},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"3b1b272f8491a0e0b9909be947bf6b7074808fa2","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.18.4_1693661373957_0.1263163661762159","host":"s3://npm-registry-packages"}},"4.18.5":{"name":"@akord/akord-js","version":"4.18.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.18.5","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"8dc782fa4214ec0f9c2a71d233429bc5cc18b37c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.18.5.tgz","fileCount":101,"integrity":"sha512-7oh5N48U/Ii5lgB17kSCx5R5z9WwzmiIYLY5naE0KBPP3j0yPgy8YreHePsDqLiHT7vKXn7eHyNW4ydq0n68gA==","signatures":[{"sig":"MEYCIQDOx54S7IiWGpXIOI/bI0HZ6lSvmLylRql9VSgFVJBzywIhAK06qrJfDwgSTq4EOBtl0ZH+LuhEF+BtB06ZnWZlYTk/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310256},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"b5db5cd7ed31ac55ecbaf2a3cb87433fe7ee7447","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.18.5_1693710901545_0.7142808211703864","host":"s3://npm-registry-packages"}},"4.19.0-beta.4":{"name":"@akord/akord-js","version":"4.19.0-beta.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.19.0-beta.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"423a3b42f400196686f623a5e54ad42e03f78e02","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.19.0-beta.4.tgz","fileCount":101,"integrity":"sha512-7GMV5Qulr7Pr2kyzOUM3LpMPswz79NgJh+Xx6vOUIksZ9TMcslq/Mkc6fuGd5BskqdC1wt9SCO1/O3nrTU0Q7A==","signatures":[{"sig":"MEYCIQCLakUH+ab2eGhg9yQhbjr7wbYJsTwXty0IuXb+8tY/DAIhAKBE8OJ3bkFbjYzEq+oqLrT2Wy75lJxrMxUN5I+zQlb6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":311755},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"44fc4e55d7ca0a17e03fb623b23fa261c0c5be7e","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.19.0-beta.4_1693922463040_0.8183398325149933","host":"s3://npm-registry-packages"}},"4.19.0-beta.5":{"name":"@akord/akord-js","version":"4.19.0-beta.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.19.0-beta.5","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"8ac7f12c3a5c2b491259edb8bb81beac4265430a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.19.0-beta.5.tgz","fileCount":101,"integrity":"sha512-oKlJlplkCHmt7cKviHP96unLA2XAv5jWG3dWaG0hxNxG9syfIg3aACkSPwQGaUTqjRm06MoesAUBZDavPzUKog==","signatures":[{"sig":"MEUCIHhFt/asH00LTEe2w05OinzUgYM6eenDMQzEyGJ2Ju0WAiEA4/I712IQ8OJw4juF1IYQ7uflF5EcW/kQxKQbMS8gy0o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":311812},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"44fc4e55d7ca0a17e03fb623b23fa261c0c5be7e","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.19.0-beta.5_1693923254763_0.45721733059780734","host":"s3://npm-registry-packages"}},"4.19.0-beta.6":{"name":"@akord/akord-js","version":"4.19.0-beta.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.19.0-beta.6","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b606861cebb373437b5480f28b6240c2af49706b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.19.0-beta.6.tgz","fileCount":103,"integrity":"sha512-Ri34plrWxrofXO1JEYPPtEtyznC2owobCLT8n1BIMMSgiPoPA9MkiziVLJxAw98Jb+NR4k2IxtixmaaJ3u31cA==","signatures":[{"sig":"MEUCIAZVJhJ00TCdj/lng712PwxuLQTtBnip48W8DJvu/5o9AiEAjRirOC9L98G4nanTi6Z/ir7tUtXzjjhD0+WGco/NI4o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":312651},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"44fc4e55d7ca0a17e03fb623b23fa261c0c5be7e","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.19.0-beta.6_1693923956846_0.7358282770316431","host":"s3://npm-registry-packages"}},"4.19.0-beta.7":{"name":"@akord/akord-js","version":"4.19.0-beta.7","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.19.0-beta.7","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bdf7126138c503ceb44f2f2910c17e2c512d9b1b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.19.0-beta.7.tgz","fileCount":101,"integrity":"sha512-v03rzVWDsCEJ5srTH/MZK63CY3xM0+anbwoefxPy3G23IXDv+SXq61WsQ0Tave/kVAeTY5z51WUdIZw7ZgDfGw==","signatures":[{"sig":"MEYCIQDLUDA3fI4H4SCOXRKIO0N8B4GKTp49Aha7nT7h/k6QawIhAIMBUn65C9WfTgBLlhQTrmqs2Q4uhNLsmQGPNFm8wugS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":312319},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"44fc4e55d7ca0a17e03fb623b23fa261c0c5be7e","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.19.0-beta.7_1694088518013_0.8342075356430656","host":"s3://npm-registry-packages"}},"4.18.6":{"name":"@akord/akord-js","version":"4.18.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.18.6","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3019e1bbb6403483363cacb30bc3afc7af80d534","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.18.6.tgz","fileCount":101,"integrity":"sha512-0Kqn+SWVmbdgkuDSB7ack1DFqd89XD0LM4TmKi5sK/axl+UIziwJrfTI3NEdxbexCKCeAjRbkYud74c6ox5XdA==","signatures":[{"sig":"MEQCIBbdJ0xbCd3bDKdrksur1MLynIeDMzT89TSpo9GG18EtAiB+4h9/clgCeFKeROPyuL9KWTBw6q2QLiq9uRxowDEjjg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310256},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"fc5f69abbaf373a421e9878561fdd7e59811d2fc","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.18.6_1694093851533_0.27139573523239435","host":"s3://npm-registry-packages"}},"4.18.7":{"name":"@akord/akord-js","version":"4.18.7","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.18.7","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1778a6471d2c7c134cd4004c65a27537a1ac3f75","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.18.7.tgz","fileCount":101,"integrity":"sha512-4SXnIANFO7ToYafZ/K/kF5ywoNeNS3YcBX+9facAuB8yMz2zG9OHj0AkTMU09OkGR6GmRVHM1EnVh456ndB7Vg==","signatures":[{"sig":"MEYCIQCfYoFkMLzb0Mfg1NOAhPFIGgvPh5FzwcGgtvwF1ExTEAIhAOOL/Z7ohhnD891itbdBO2WWecW/flNSQEs9K4cX4JqA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310256},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"b7a327a5e62b3886163b738bae83e9366e193178","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.18.7_1694094407683_0.1060986401889994","host":"s3://npm-registry-packages"}},"4.18.8":{"name":"@akord/akord-js","version":"4.18.8","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.18.8","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"37952795f3b6364f300776f1134cd6216067e80e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.18.8.tgz","fileCount":101,"integrity":"sha512-y1vqB0E+SJhcibgE1PmQkXeSqX27Q+ZCAAdBrlffDfNem6yjnYZZ2aIy9Jo1c7v9NBZuGdjkX6n683zplG4yGw==","signatures":[{"sig":"MEUCIDR/fe6mWmFFu1BD+CPGGoETbdtltGUovcMU82G1yOz9AiEAvUyu5FpPwvQMRCEOr8oQXt99Wg+35mB8KgpIys1AyCk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310271},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"130a883f29d1dc4908a2a926fff01aa59bf70865","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.18.8_1694096483973_0.3599880054905007","host":"s3://npm-registry-packages"}},"4.19.0":{"name":"@akord/akord-js","version":"4.19.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.19.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a63a5c0a2cff71c483c10f7efa30b29161b5a20c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.19.0.tgz","fileCount":103,"integrity":"sha512-NVpFxk+EPIJ1sDKZN8YlM7B2wa6P0c4WYhNsmgisbnH97Jq6XopI5RE0M8poKhVCjkm7PEIX11+P60FE2YjPsg==","signatures":[{"sig":"MEYCIQCyAH0HhBd8+Oln0aTMzibSaNT3/PAXCQ+WeoenlLdxigIhAKkZCIEBiotnwby/ZmJy6HUDuk18FpKZUdAPF7akvglI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":311354},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"688b4f7c4df098f4967469eac2c3f0ef444625d5","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.19.0_1694174662922_0.5529075111755095","host":"s3://npm-registry-packages"}},"4.19.1":{"name":"@akord/akord-js","version":"4.19.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.19.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6275d47950e4e016c0d259635a7ac8df6dc2a9cc","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.19.1.tgz","fileCount":103,"integrity":"sha512-ZdxHL3irI+h7ml52vHPMqh3QgsXgoFNxZkIoH7CCnLMzr+B/MRmSkLn0cAkpic8p65rX5Tkhxw3fxd23AtT16w==","signatures":[{"sig":"MEYCIQDhyi0W+OuZ/tQxaLuQ/HwlwWb+Dvj25zonDLmy2dW9EQIhAOVTdzjxumR9YO5j5+JJutsitnXMBFuZKRz4p736t7/U","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":311393},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"116d99138c714df6d00494a4855eafaba023ace7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.19.1_1694431019561_0.6777330757109961","host":"s3://npm-registry-packages"}},"4.20.0-beta.0":{"name":"@akord/akord-js","version":"4.20.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.20.0-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d37b6ad6a46120fbd1733d134ee67b9bb36ca921","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.20.0-beta.0.tgz","fileCount":113,"integrity":"sha512-ZGgcBvORfkL0Jk4gzskfppuoG14SJcMLGO9PrftO80ZHE8+qX0HDRPnmQbFZO0NzysToMTE6zhfOzVKw7cewLQ==","signatures":[{"sig":"MEYCIQCWUDSRKXbUGWYZl0A6+IWWTdyOxmp1L/mWqPvI//VQ3QIhAOSOnrEwr5048XvfDbIKdYFdaueFlsyfrUzzIcS0McLJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":326790},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"fc7e7e7490e84ccc9df9dc7effad2362ca7cd990","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","@akord/crypto":"0.13.3","@akord/akord-auth":"0.28.0","isomorphic-unfetch":"^4.0.2","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.7.0","dotenv":"^16.0.2","ts-jest":"^29.1.1","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.20.0-beta.0_1695377222778_0.3366277134394684","host":"s3://npm-registry-packages"}},"4.20.0-beta.1":{"name":"@akord/akord-js","version":"4.20.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.20.0-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6b0de001e3a1437ebd093d6a777e8384bb386505","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.20.0-beta.1.tgz","fileCount":113,"integrity":"sha512-EOfBtktn5vVIGp+CG84r2mtxZyEmLjvnHOd9RCIeTou2wBiY9QSt/eXjsFmoZoidWG7Umv+FpXqyd1opvhKwug==","signatures":[{"sig":"MEYCIQD1Vv0u/Z5QtDIgf7NeZ8mlsCvO84lg3GNRN/kCY2ieQQIhALlVaVaZu5our7DBCNJ1bLPfU+2Wu/C+4S7EeStcxGdW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":327045},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"fc7e7e7490e84ccc9df9dc7effad2362ca7cd990","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","@akord/crypto":"0.13.3","@akord/akord-auth":"0.28.0","isomorphic-unfetch":"^4.0.2","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.7.0","dotenv":"^16.0.2","ts-jest":"^29.1.1","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.20.0-beta.1_1695390130319_0.8402983377045652","host":"s3://npm-registry-packages"}},"4.1.0-alpha.0":{"name":"@akord/akord-js","version":"4.1.0-alpha.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.1.0-alpha.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c584dcc1966721485d7233f10b74fc0d3cb86ce5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.1.0-alpha.0.tgz","fileCount":111,"integrity":"sha512-hthLo42F1yAa8yqF2FHE/W6yS96HwVLgaJ9Mbl5sJViPwRcqDuXta8hswcwuYiSQso+bqHoB/9U3XDWAjB+hcQ==","signatures":[{"sig":"MEYCIQDiwOARCyHl0KY8LzQf/bD2eP78/x99hcOYwm4EBErGOAIhAOTegBsGTfUXNpoyMTtRUZFCRzPHQuyD4OHnRFrEqdfb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":326769},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Unviersal Data Licence](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and is automatically listed on the [Universal Market Place](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, load your asset content\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst asset = await NodeJs.File.fromPath(\"path to your nft data\");\n\n// Now, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing asset content, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, asset, nftMetadata, { udl: udlTerms });\n```\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"e75f057af0ad02605638d83f25eaf5e3eb2c76e6","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.1.0-alpha.0_1695982216409_0.7152168686180795","host":"s3://npm-registry-packages"}},"4.2.0-alpha.0":{"name":"@akord/akord-js","version":"4.2.0-alpha.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.2.0-alpha.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f87c74a1be87e99c064e996918c3fce4dd11109f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.2.0-alpha.0.tgz","fileCount":121,"integrity":"sha512-18WJd4gQg1iDYireftHIfC+TbyE5JfZ7CCDMCjVU0i3vpjYJXp6MT6NFhUaBDP3VeSVUkqSvqPg+Yphiipjq8w==","signatures":[{"sig":"MEYCIQDrpNDWzr2c1+kChojf80XdEXeBx39A6/gBvDo2OjbVOwIhAObITgg8+5jfkMo38Kr73SFdF1scRPYrYVOwn1TmSZdH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":339291},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Unviersal Data Licence](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and is automatically listed on the [Universal Market Place](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, load your asset content\nimport { NodeJs } from \"@akord/akord-js/lib/types/file\";\nconst asset = await NodeJs.File.fromPath(\"path to your nft data\");\n\n// Now, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing asset content, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, asset, nftMetadata, { udl: udlTerms });\n```\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"e75f057af0ad02605638d83f25eaf5e3eb2c76e6","scripts":{"test":"jest --watchAll --verbose false --collectCoverage=false","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.2.0-alpha.0_1695991760106_0.9251911678154225","host":"s3://npm-registry-packages"}},"4.10.0-alpha.0":{"name":"@akord/akord-js","version":"4.10.0-alpha.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.10.0-alpha.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3f18d772e55c7772957b03e5dbbf9b9e1e81996a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.10.0-alpha.0.tgz","fileCount":103,"integrity":"sha512-tC/qB2mZ15asF2j+vvUZMlxFs7Gue/1MxrhUip2/CsyB/0UNP7dwFTgFabK7ettJlINZO0zWTbxlSwssErP76g==","signatures":[{"sig":"MEUCIQCrNatDCdJdgtnmcOK1IMksUrjltxmRnuwwU70g9QTM6wIgF9MfC3Yy0pfVtag6VT2hVtO3GZSUp/vBgzhxR76nBms=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314131},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"47a0883ef8469e89a17686e28666019d56f3d77a","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.10.0-alpha.0_1696245603351_0.9751396714159619","host":"s3://npm-registry-packages"}},"4.20.0":{"name":"@akord/akord-js","version":"4.20.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.20.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e9fbb7effa246de6577f4d6bee76df86d95173c1","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.20.0.tgz","fileCount":103,"integrity":"sha512-6M6PYdHtdSMrKPlVWnE+O6QwxO8X6ovUP8a0BBbbaHH0JAJGlifyA+H863dIWtnFXD8q/xahgkpMv+nYku5WqQ==","signatures":[{"sig":"MEUCIDoFNwHFFOVhQUnX7PQ2PBBGURkhmQzU+9pyDTNf9UOaAiEAyDfTB4qo4vCY23Umh82+gAyWKfx/QfxIqfCdC1dqxa0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314162},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"e97ee13972e2daeecc1bf130e460f2f00dda437e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.20.0_1696264154928_0.46170103448416056","host":"s3://npm-registry-packages"}},"4.21.0-beta.0":{"name":"@akord/akord-js","version":"4.21.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.21.0-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bb37d433ce299b1dc908dc25fef2e51f6fa14f69","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.21.0-beta.0.tgz","fileCount":113,"integrity":"sha512-dDzFUwhNMXP/BqIL3g0zqcQ8ig44UeQ91/v7TIwe4Fa8a8Mxk1fVJc8ILfJXf51FfW99pm/NPFKZv6JGzD5q7g==","signatures":[{"sig":"MEUCIQDQwjEoTTxG6m0gJybymwmkiWQuCCcLFfvtdTYPMg59xwIgGdRKOuVGGvwS1ozVsSbHUEFzyyjoFyOmsqL0KYEmWcs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":330150},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Unviersal Data Licence](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and is automatically listed on the [Universal Market Place](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n```\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"20625f741db203e27de49a5139727b029e77c0f5","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.21.0-beta.0_1696429364405_0.5737247049111078","host":"s3://npm-registry-packages"}},"4.20.0-beta.2":{"name":"@akord/akord-js","version":"4.20.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.20.0-beta.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a419b0a011874fd834282882f8089aab5360e823","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.20.0-beta.2.tgz","fileCount":113,"integrity":"sha512-x2pjDRyVQsJaO1XXBGCSwXPT23sMdVKCP9VpfW01Y+siV28lznat1KYm9SgAhrSzuWr4y0VQcng7vlhq/fSfnw==","signatures":[{"sig":"MEYCIQDPruhRohhp1z9fayJ4VrYM7f1ACVETfc2LuiOTAtAXKwIhANOnFQ8QAKCkqjbLJCFbnlpSNLjwTTssZ/qP4lqOijiJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":328046},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"a1600b13f3c9842995312a6f6c38f40483f2320b","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","@akord/crypto":"0.13.3","@akord/akord-auth":"0.28.0","isomorphic-unfetch":"^4.0.2","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.7.0","dotenv":"^16.0.2","ts-jest":"^29.1.1","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.20.0-beta.2_1696507297440_0.7958047948216627","host":"s3://npm-registry-packages"}},"4.20.0-beta.3":{"name":"@akord/akord-js","version":"4.20.0-beta.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.20.0-beta.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"84c4b63c02986ffaf70ddec5fe16ae88c405afad","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.20.0-beta.3.tgz","fileCount":113,"integrity":"sha512-IhuIHHS1IK3bS8G87I4SNhNXUlkQumaBLPjsv7McPwS6mlJeEnU4lUN4q/SKdje1Zd5LozT3pgYcV2dXd88qfQ==","signatures":[{"sig":"MEUCICDJwyySj3aDGcrleyVSOJfourfE/D8NEklIBbhXcMf6AiEA3lvJWuN9DOCkOsr3d8YeIlg6d/bCP/tSNGZqyHE6PIQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":328102},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object - web: File, node: NodeJs.File (Blob implementation; web like File) \n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\n\n// create a stack with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, file, \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileLike`][file-like], required) - file object\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { NodeJs } from \"@akord/akord-js/lib/types/file-like\";\nconst file = await NodeJs.File.fromPath(\"path to your file\");\nconst { transactionId } = await akord.stack.uploadRevision(stackId, file);\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c6fd42de0db9ae7994d6a23f61f9fd864904510e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","@akord/crypto":"0.13.3","@akord/akord-auth":"0.28.0","isomorphic-unfetch":"^4.0.2","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.7.0","dotenv":"^16.0.2","ts-jest":"^29.1.1","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.20.0-beta.3_1696517508432_0.3336228551639575","host":"s3://npm-registry-packages"}},"4.20.0-alpha.0":{"name":"@akord/akord-js","version":"4.20.0-alpha.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.20.0-alpha.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f3759e5700dd2e750a8dd70228c31879bc74653f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.20.0-alpha.0.tgz","fileCount":117,"integrity":"sha512-Kajekijxu2WkkLaMnd7E619HwKcEdqcyuudpVdjzxzI0/Z99x2Sd6MNSrkjHjIGsf/6m93tUhCB1bf6agzrwWw==","signatures":[{"sig":"MEUCIQC7uu0tpCSClTdhwMUVbWh2qMGXy+hp6Lc7VvpW4VckgwIgC//UpD/IjlcRvRuY4seWBM9sDYxdOGwioGTIU21bTZM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":336813},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n```\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"570321ed483b06cce36aac8e068f1a7687af4877","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.20.0-alpha.0_1697447880526_0.8856792514457519","host":"s3://npm-registry-packages"}},"4.20.0-alpha.1":{"name":"@akord/akord-js","version":"4.20.0-alpha.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.20.0-alpha.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"cdad45cb2be22959f50cbeb2bb63340ef1cf7fd7","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.20.0-alpha.1.tgz","fileCount":117,"integrity":"sha512-fTI/rxIws0M9f8Z4CtGRDtQKx+oj9lqwpPuI+T4K2jbFykU+xbonh+0dUh6AgIGkZLtq1AR97QtWVR/a42xJXA==","signatures":[{"sig":"MEYCIQDCQhH3gB3C3mqq85WfRF71KjCilbwLB2fYzggAn9Y8PQIhAKJizGJ1ybitxWSjE0B2VANYBmGoDSvDqhTlDoSsh7mt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":338893},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n```\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"570321ed483b06cce36aac8e068f1a7687af4877","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.20.0-alpha.1_1697723299877_0.9175888008147302","host":"s3://npm-registry-packages"}},"4.20.1":{"name":"@akord/akord-js","version":"4.20.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.20.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c674db619e26df6d3deac6c73863c7776cdeba94","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.20.1.tgz","fileCount":103,"integrity":"sha512-dfOx/NfS9dkP+MwJhZnxoAeawtBZIFNj0gPtdv8BGQ3y6eVHGYRs7KbouwXCdwJMx7+i/L55gr7Ps7GdhQfRzg==","signatures":[{"sig":"MEUCIFD6uKKRSmdHMTpz29ndopVEWRs0rcug0bOxAMLyKKyRAiEAkwRTNWB5DGA4+W3Y8v0mq0GIkvYocShi79wZAAF56+E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314162},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"e2a61a345ae3126aa34b00d43d697ae61fe2ca44","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.20.1_1698165866916_0.14900121773280062","host":"s3://npm-registry-packages"}},"4.21.0-beta.1":{"name":"@akord/akord-js","version":"4.21.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.21.0-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"55cdc383b38d4c54f202ce05c053272de39092af","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.21.0-beta.1.tgz","fileCount":117,"integrity":"sha512-RwC87N69SmJMqpOZAMpsaHLRxrs0JZArtTVr73OBW/63hLCdlfaiSg0HYme42fdkyKQCd+RctZxhqVXne072NQ==","signatures":[{"sig":"MEUCIQDV4XRLyzr9CCvX6wZE9dH7+3yCV18Rbo2mo89Hi2cEUwIgfrPEanbQsikDYGWydxgzpZNOcba2fjpl2Bm2+sjFriU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":364281},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n```\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"4a1afa667a94c8326267171bf41acf609c6e6c59","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.21.0-beta.1_1698404552412_0.5426914139027581","host":"s3://npm-registry-packages"}},"4.21.0":{"name":"@akord/akord-js","version":"4.21.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.21.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"fa258a56c6b6c799ec4759f2eb3901faf4aedf2c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.21.0.tgz","fileCount":103,"integrity":"sha512-iA1+JDC6Y0FGmrgWMmtEJhlZ6KDTHHcbYubRpAGFdtIJrUMXQ3r157NnlOQLeiH4CgyRAwDCSFYOqvGUJcb67Q==","signatures":[{"sig":"MEUCIDpsAGp1vfFG2WPm/fp35197G7WfZr/uM0Xus0TH83uyAiEAr4sWOFACnGM5gOFDcEOqXCsPy/iflkIZUTtJxck6UN0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314162},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"eec8a5b71528644e1f612d7c8edbd115cc3d3198","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.21.0_1698671386809_0.07318075540402846","host":"s3://npm-registry-packages"}},"4.21.1":{"name":"@akord/akord-js","version":"4.21.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.21.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bb1c415afd7ed1d5b30a1a899a6263d11037086a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.21.1.tgz","fileCount":103,"integrity":"sha512-3BG8JDPiEKFMA9HcvIE+bSWTPOy5i+eJfLpW2CnsEjaDwnYEWkJeq6GyeFhPphhB++GzKBF12R/VHq6/byI9FA==","signatures":[{"sig":"MEUCIHuxtBHky5QsTV3TPGeyD0N/NSaYC2ISEtqpeNqaqMhOAiEAuJxKLVC3cHvPwlvP9RQt4su0K8QhaWSLrmRn611GSHA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314162},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"4f7696331a3a6754c444c6a04a97d4d6b812bd98","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.21.1_1698684313393_0.40741713708714644","host":"s3://npm-registry-packages"}},"4.21.2":{"name":"@akord/akord-js","version":"4.21.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.21.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e9e90a2da1b5551a4389a64f22c784945f4d86b5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.21.2.tgz","fileCount":103,"integrity":"sha512-4G7frczBf3JDfKzNmT99zOc7bBbH4KFQMVoC+4+hYa8rG0bUJb99dY7wqXZB+W93uQ4D+MXW80cWQWRYjtUTQw==","signatures":[{"sig":"MEQCIHrTNfglYxrdQdkd9om+7bnyxBCclNJ5mMk6TnMqt6sjAiBjvJDO9LyiJhGK6+VXW0Uwpcdc3LnO3P3+es9V36s4Fw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314162},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"b50953bb5e948442833ed43b1247fd76e9307fef","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.21.2_1698692709993_0.006304565074894519","host":"s3://npm-registry-packages"}},"4.21.3":{"name":"@akord/akord-js","version":"4.21.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.21.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ced443a6f125a4bbfb3a979b8343b9a9b6f87ba7","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.21.3.tgz","fileCount":103,"integrity":"sha512-W8Bo75I3pFW2vkYfBf/gCoF09boCWmslruQAmGqsPiuSqN+3NevYWSmoomgwCTk5DcXG6tlU+Mqcvb+LwgAXsw==","signatures":[{"sig":"MEUCIEPREHC71MIZeY4Dejg28tbGHqas14otSYdhMMtNzJebAiEA2gfxbXhIvw79405Rm7sALhxagc9UuXEinWCSCJ6CVxQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314162},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"c386c9a44509d53222eb9e4837ab51e24672fa1a","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.21.3_1698867434429_0.3524362145043278","host":"s3://npm-registry-packages"}},"4.21.4":{"name":"@akord/akord-js","version":"4.21.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.21.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4fba52370141ed555c948e4dd14bdd2527362264","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.21.4.tgz","fileCount":103,"integrity":"sha512-HUbGlY/G7QOofPEPTp/Cq9a5ECQLiMlfWKNDlzw6sZHrcDxpAcienX6JMGl30yFJx6kxX2lZsV+pJ2CyurEyww==","signatures":[{"sig":"MEYCIQDN/TIdoY1bJYsHUWF0d1zqXuzmxi1t6MXjiXgFFJSbywIhAIlxkLMagAAFoR9XqAmj1R0G2mjhsyLjONYNYKI/38sb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314162},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"2a73b6a1edc918a1ae403a40b1d2b086223b2c88","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.21.4_1698868006467_0.6204625876405558","host":"s3://npm-registry-packages"}},"4.21.5":{"name":"@akord/akord-js","version":"4.21.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.21.5","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bb3fa20fe80e3e5a27fd7bbb96a6eea3ff88f951","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.21.5.tgz","fileCount":103,"integrity":"sha512-qJQcHGHsjOLL/aQu+P4W8lErj+Wi7ZxeBin1n3RJJ6aH+Xtkj3yuYbJUbguHCzwtBubrys1hw2Hdf+WuSns5/A==","signatures":[{"sig":"MEQCIEauxQcuI1k760XZLsDNOB/ad/ITl7omgT0YXTSID3pgAiAdz79cS8Zz/y0juh+3FEIXg1biVTMEgSUmeDgszzfS9w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314162},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"1acb325aa82d6cbf538d8177f8725126037f4c84","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.21.5_1698868545752_0.7537906462123776","host":"s3://npm-registry-packages"}},"4.21.6":{"name":"@akord/akord-js","version":"4.21.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.21.6","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5cfe6011c313d9225a4339180cf22410d0e04b23","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.21.6.tgz","fileCount":103,"integrity":"sha512-bkZIlKNkVtuvGwI4rXTkCGMo99MPu+PSuVME9YewD0BFcH/Z+syHeAN6ne8OEa43afMr8HoFzylPMju7oNl4Eg==","signatures":[{"sig":"MEUCIGtDoB4W6FBpvDzQfHmyPHUoVFKRGCQrbWZNfQYLkKQWAiEA1UqeJ649Rf39C055ukjM3U5NzQGKZoB1D0kQXGC7ESs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314162},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"9b982a4939280dae711d6afa2fc4f996d301cfe7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.21.6_1698870493522_0.04242490751172845","host":"s3://npm-registry-packages"}},"4.21.7":{"name":"@akord/akord-js","version":"4.21.7","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.21.7","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d487408ab36c1540d98b4a49971aed43d607b1b8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.21.7.tgz","fileCount":103,"integrity":"sha512-HxpMVU2RGSZqXNm8H/Ag25ffTE9WfaOYF+SDV5GDzrXi38Fc+0bKY9sVqRnFOwrVL2OkTlJxXggypquEP1rORQ==","signatures":[{"sig":"MEQCIFWoVNPBqhqeQfWeKTb/xBDPNdMmzfG/rRkFqUnXEIwMAiAMJXI7QJwid/kyzWgYLobItGY3ZFZ/Fgc2t8Buq4Pksw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314364},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"871c8088e7b40765d0b06639494ed54c84021969","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.21.7_1698945269148_0.024267827409804488","host":"s3://npm-registry-packages"}},"4.21.8":{"name":"@akord/akord-js","version":"4.21.8","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.21.8","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"fd26961e2168b857a5a92939b7482026fcb03973","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.21.8.tgz","fileCount":103,"integrity":"sha512-YW0D60rfeT/5BO8ixggw6yw58xbB436kEbkw/bWabwqrzxsfreEjVJga3/8yu4QFhADkqSriUP75qxcqMZKsbQ==","signatures":[{"sig":"MEUCIENZUQvWfRtJkUvrQC1bvMVBIgdte+8yEaiJrDLyEeRcAiEAwbjmLnx1UsvB1SNXTHyuRn3AR9iM2+3TnDsA0zlT57c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314364},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"000626654324e2faf273f0620579cd66520fb918","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.21.8_1698949213444_0.9606966440589393","host":"s3://npm-registry-packages"}},"4.21.9":{"name":"@akord/akord-js","version":"4.21.9","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.21.9","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"88af8fdfd92e1fa4787e1569a0223ec7907774e8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.21.9.tgz","fileCount":103,"integrity":"sha512-O3xmK14lsvBhECh1Fl9RbMKrzknJ5iSxbuldnEVOjr+nsxMnBNU8u9RZ3ZYQ741CCw4nDSRxCGmN1L6S7TRWpg==","signatures":[{"sig":"MEQCIH+4jvSplyJTR3JHbZaX4euhtwDHscG9ZUGqVrLeXW8UAiAvoeqhfG9WNJcuPzH/x4NwkkATV+EWuhysEh4ZSbS86g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314319},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"b74f5c7ff54b7fb94f030c0fb62896a1473c3634","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.21.9_1699267248769_0.6337095511565605","host":"s3://npm-registry-packages"}},"5.0.0-beta.0":{"name":"@akord/akord-js","version":"5.0.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"463871792aa9c155f50c7b0dbb86047f3d68410c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.0.tgz","fileCount":119,"integrity":"sha512-WRm/mQ+OOsWkD1aNGcT91Q/9pKYlZ4PZHIlo6AQQ9UMifWiN+ISHJKS1LXSiL6TpQ1Ss9Ph3WHcDWr8p9BZSqw==","signatures":[{"sig":"MEYCIQDcxO/aVcKy0P5AWvTn9TzcPJyOHJvwpQOHmkig/+cCuwIhALZPWbWgqJN8SzYXcTChEnDEPj0LGoxrPCKJoE9HLPsy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":348555},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"e092848abcec1ad75ff956c529f5d39c5e788918","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.15.0-beta.3","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.0_1699284277609_0.05321002659948437","host":"s3://npm-registry-packages"}},"5.0.0-beta.1":{"name":"@akord/akord-js","version":"5.0.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"04d07fdbee979ebb0a1c50b787870ba799881f21","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.1.tgz","fileCount":119,"integrity":"sha512-AHCgowczSTlWXtX7Z5Kc2JrUEJdv4pJuF0R9cK6WcgTs4L+/dYa/YBzjRf5BQVK+HU5iy0VF+AGIjE8Q3a9WDA==","signatures":[{"sig":"MEUCIQD6D0O7oSix6IRQk787qWd4Z4d2doQ7TpOxNXsPeIouRAIgITdBtNjWxmnXyc8ZXcNCCrNuWyabneh0gugOfbfojGc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":348623},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"e092848abcec1ad75ff956c529f5d39c5e788918","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.15.0-beta.3","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.1_1699297923891_0.19584047511696445","host":"s3://npm-registry-packages"}},"5.0.0-beta.2":{"name":"@akord/akord-js","version":"5.0.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1c856c51bfbe378088083b081b08fc4ab3778fb0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.2.tgz","fileCount":119,"integrity":"sha512-CVpu78pkm22b27CxJm8zIoz1Tf/Zc1IxBMGJXvMt0hlgQbSB2zz2rAj4CRoD32krQFyOkEWVeJENs1W50C6RcQ==","signatures":[{"sig":"MEQCIFtfduOVhw/ux6SmZtO3QjjSblEs6ja8zqtAilFSHHS8AiAQm1uVkjufIK2jtSbXqDivDv+P3w8VrVI+6eXAoCf3rA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":348803},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"e092848abcec1ad75ff956c529f5d39c5e788918","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.15.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.2_1699456412959_0.7596305788290054","host":"s3://npm-registry-packages"}},"4.21.10":{"name":"@akord/akord-js","version":"4.21.10","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.21.10","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"65a47cef812ff9c206102c225728c715a755fdfb","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.21.10.tgz","fileCount":103,"integrity":"sha512-+1WFz5TJ0+r/YjPU9A7grY0Kx9BC/t/E45jlrLB3Pt2ilgkFQXzy+J8sCt4y3YFl96J8AywdotI9VwFSPaZOdw==","signatures":[{"sig":"MEUCIQC5qBCbM9nS50itcfw1S/yB1RGcPQkgPg7S5EXiX9j78QIgE/VY5xxt0/a8QEUk7N5d/MgPMOyhFxiIwrTp043r96I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":314464},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"51a277dbfa5e6dc42391e19a58bd8e04a919133e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.21.10_1699475181125_0.9720431982681679","host":"s3://npm-registry-packages"}},"5.0.0-beta.3":{"name":"@akord/akord-js","version":"5.0.0-beta.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"79b22d046279bcb3b29241b7e3948d428e4859c0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.3.tgz","fileCount":119,"integrity":"sha512-ovXBFqZotYmUvACx6/8JK97+x/z6vjLr/Dvv917989yxHU182zXLfRI49QUZxLwDSc0MGrOTcDi3kXB6SoZgUg==","signatures":[{"sig":"MEQCICLPJL8iWHYa5M//Hn8xjUd/Bo/49X+GXk28ywW+CNOmAiBTpEunlOi437ntP2CMPxFxx8kC0eHRC0zf3X6m0Xw4dQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":348795},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"ad7b87a1ee756527544275aa1fbeb4d475dfeaa9","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.15.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.3_1699483130036_0.01894798432429834","host":"s3://npm-registry-packages"}},"5.0.0-beta.4":{"name":"@akord/akord-js","version":"5.0.0-beta.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"04719861f73049f7960518b105282544d14f790e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.4.tgz","fileCount":119,"integrity":"sha512-Z0OyL6Quco54xKEc3w9GREJ4yLqSncAftkLDXzkL30PHim6KqC+Fzj0dpb/DbgMqRDGx+4t7RcpXVwyMLTBUUA==","signatures":[{"sig":"MEYCIQC32eCb3thhf+lZQdhRZgfhBzCD788Gi4i+CN0QzldU6wIhAKXBKUVPnQgyee/uCTOpCTg3mwrBFY0KH72UXZO8eFVe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":348795},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"affb10af5f571ecd74aec8debd18a9c540b9da56","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.4_1699484733317_0.4850993227728728","host":"s3://npm-registry-packages"}},"5.0.0-beta.5":{"name":"@akord/akord-js","version":"5.0.0-beta.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.5","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"eb1fa2a89283b3df7bb2460fc9f939feb872940a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.5.tgz","fileCount":119,"integrity":"sha512-vPo+0ecx4r6gwYYcmbzn119oYsDkm5oxCCPFMpvInXrbkiIoMNfi9QMZcUlGsV1OvvA48ZY42Gm2GpReghlmvA==","signatures":[{"sig":"MEYCIQD/4M4h4Fd7UVt22fo4iZWc0H9GehyRVOJz+j78nK8FgwIhAOPFmtngXFVEvGwA884M30QCO36sWUglKYEZtn1YoRjk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":349707},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"531c478971a335011df2ad60ddb9ab08f4110603","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.5_1699485955008_0.775949985849697","host":"s3://npm-registry-packages"}},"4.22.0":{"name":"@akord/akord-js","version":"4.22.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.22.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f5942deeda117cb020a798d656dd0fff55b27224","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.22.0.tgz","fileCount":113,"integrity":"sha512-Bdbv1goTTZUssKho2uWE151tr45q+VDq29o4PDQG/qEQCtONX7+QsxPDJd2J0ezVnnOe1C6mu7btGjrDu/HXLg==","signatures":[{"sig":"MEUCIQDTLLeR+dkUVs6hudizBIwGgbplw2J7ffqkAGUddpGpcwIgLlMdyMXmHxVgyHfQMJYbiuuT3WRvGK3n2d17ORkrJnk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":331541},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"498f054ae54fa1a620aae66f918bacc88dfa90e8","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.22.0_1699536601697_0.5831669004682667","host":"s3://npm-registry-packages"}},"5.0.0-beta.6":{"name":"@akord/akord-js","version":"5.0.0-beta.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.6","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e419bfe6f28ccdc64bee335627d039364ef9d622","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.6.tgz","fileCount":119,"integrity":"sha512-vntbuZD5YUYUbQZ351/yfP73CqjWtilyjAFnPbKceSYP3QoTLTWjuCb90jEEw4kNUarf9skPdn9Tp9/AjahKHg==","signatures":[{"sig":"MEYCIQDEOvQna0nsBtp0b3k/lo9eTefNgZgcs9PPOm4XLkd4IgIhAJWDcDhvhftwWz+jnnSUT9Gcf//33hJR6Oi9GdcNPCve","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":349956},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"7824d1e63352fee3f7b3a5e144be9f9d86c5bcf7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.6_1699834026764_0.012917759600317602","host":"s3://npm-registry-packages"}},"5.0.0-beta.7":{"name":"@akord/akord-js","version":"5.0.0-beta.7","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.7","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"867e5482c59424155ea323fe62130828ddd44606","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.7.tgz","fileCount":119,"integrity":"sha512-Zm4WM2N6scU2bI6G/e63UiwoWELxzbZvqKcCJ5MOqvHeF13Ifgb+uOT9vYwyZV4mpcR/sx+iM/uz/tgL9Eys8g==","signatures":[{"sig":"MEQCIEXJqWKaSdlfgKGKHdda+lka9T8vZPk6Na1lRKnPE4gtAiB5WCjIZ4tfAk2lpFq2XRQqJbHRJz3CBNrT3B+1TpB9JA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":349956},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"f2cd643b542da93dd3b50faf37742ec5d3c61c83","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.7_1699879842204_0.4613504560746273","host":"s3://npm-registry-packages"}},"4.23.0":{"name":"@akord/akord-js","version":"4.23.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.23.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f6f35260a18d2b9d5a2fc899241f34a86c4e1358","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.23.0.tgz","fileCount":113,"integrity":"sha512-QmYV/D4ivBAMoLFkzvPLsFE8qSul2wjciAGB8E/nuGfDxLDok/WHg5QHJWr8zJbR4fmBOnn505j4AZiIZIrFBw==","signatures":[{"sig":"MEUCIFLSrVk+nUy7w0x8cAi2ObJrydP/ZLVfOeNDEfki2DnXAiEA+O3LYhw7VLO+vXO6M26xqkF4K5653pnqx/EyU+8AePg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":334841},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"6dfb0947cd1fcf62a62cb3cdf07b0fe02bd8dbf6","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.23.0_1699890368247_0.32945125058536373","host":"s3://npm-registry-packages"}},"4.23.1":{"name":"@akord/akord-js","version":"4.23.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.23.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"db2fccd384f8366d0a1f800234cc9b2d24c6bac2","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.23.1.tgz","fileCount":113,"integrity":"sha512-7d9J+R2qk3BUA5zkt+vrP9npnb+TkNTGzpzpTv0PJ2NALgindxJhMFsd1VtiuO/h/FKfnFeGmU7o29I95KZs5g==","signatures":[{"sig":"MEUCIDbyeTz7y3WJq7b3jaw9Bqqy4JnI4J/3RiHpG5OnTbs1AiEA6iywyuzKaH/oF5hujdMTAGU9MaeOhbbJ7Ytd4JyVfzI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":334841},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"c3bd7d4fb807c15e65a398ccd9c1646d76d9f13f","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.23.1_1699891939763_0.37507053267646007","host":"s3://npm-registry-packages"}},"5.0.0-beta.8":{"name":"@akord/akord-js","version":"5.0.0-beta.8","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.8","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"359f6fada21e934f193690dd4ff1c822fa386e25","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.8.tgz","fileCount":119,"integrity":"sha512-j4EHevxE/TgcvBB2iaFd8o7MUn0pEAvwpYU7LJMNWKbJblzPR3CljQNb6Oy9sWyq5Eax2z4VtqMV1dNOLU47fA==","signatures":[{"sig":"MEUCIQD6H472nBTUGjEpL18Q5ohjGuIRcGRLCEOm8Y6IGaPRvQIgJGnRjCDRcxJaTp+4v1GNPaEPSCU8lTLanP7kqOC5e2o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":348919},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"1fd4a5e87ba1c8a1e4572198c45c5ad355f541ba","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","p-queue":"^7.4.1","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.8_1699904459100_0.15218831923265963","host":"s3://npm-registry-packages"}},"5.0.0-beta.9":{"name":"@akord/akord-js","version":"5.0.0-beta.9","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.9","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e997552e59db57c5dc3bd616c4656cff0ffced28","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.9.tgz","fileCount":119,"integrity":"sha512-BN4AuaOJp0Kq9TjQlJ2PXoo+OREPlRfLinJAR/b7mN07HFmz/sKb1R4N2SMInqlTpQ3sFL5HjKc0OMmQNSjUFg==","signatures":[{"sig":"MEUCIC4GrnnArQutzY0lNI63p5/B2w3b9dDJIqWxRJuPaz9mAiEAr1F5Hax+DRpbWvnrtx+2hPaePaITCoPy/ElSfUEj4ek=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":348915},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"1fd4a5e87ba1c8a1e4572198c45c5ad355f541ba","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","p-queue":"^7.4.1","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.9_1699906048771_0.3049532002759767","host":"s3://npm-registry-packages"}},"5.0.0-beta.10":{"name":"@akord/akord-js","version":"5.0.0-beta.10","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.10","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"395401535550e3517280f759ab2592d9c8090744","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.10.tgz","fileCount":119,"integrity":"sha512-2xJ+5u2wBnooplrK8oJNUzQopNgEso6AwU7MWMvMjtKkDKL0srW/tVLj3+freTj2yewFa3tralpMmHEAr7U0Eg==","signatures":[{"sig":"MEUCIQDNl/m7L+RlLXAZeYofSkpTGy2ctGROSzR1HdJ2X6CbUgIgRa8NZjVmKM+fVLEuE8xGW4thjYHeJ+y4rJnFh274Fgg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":353570},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"a1b602b9a6d8d9a9f1909f6a0e85cb618ac4d77b","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","p-queue":"^7.4.1","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.10_1700071862610_0.3241949105010926","host":"s3://npm-registry-packages"}},"4.23.2":{"name":"@akord/akord-js","version":"4.23.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.23.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"63558f2575a645d6732647ada3b35e98d95d4267","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.23.2.tgz","fileCount":113,"integrity":"sha512-W0vJPELYVP7cFiB/QQ2JmzQnikIunBW6sOjhBsvHETqM46Na5Q+TgGdN9L4Qh8nDBrt130l6wNg2sWdipXsxbw==","signatures":[{"sig":"MEYCIQDf4sbjveW+aH7Zv21rJnk8OVxmgcX0uYu10MltarPlDwIhAJW+bip0WpE3kSF9+7JXp6Kr6JcROlrOCBISKNziw89j","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":334837},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"9357380ee04caff14c591d7cfdac2e661950e994","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.23.2_1700127713186_0.5539808761928549","host":"s3://npm-registry-packages"}},"4.23.3":{"name":"@akord/akord-js","version":"4.23.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.23.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"69a3cfb35bee24f3104008b0ef28efe73f31386d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.23.3.tgz","fileCount":113,"integrity":"sha512-3ri90Zn9h1y8jGYQdGhRgVnrGRSVR+8hdmomN18zPYPkfeBcfIffUO+nZzv4X4IvellD6sbrYUTuhe7e6a6VkA==","signatures":[{"sig":"MEUCIGbhYSqX64uJqIjtFbdvR2ph5Xo9UKkoiztsNxU0700aAiEAojIDnJBv953w3XMS6GHeR767gE5W5irPEyvbjHF199c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":334837},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"70c940e08ce70d802d783198a0999e07c3e8baae","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.23.3_1700145809568_0.7330015819436584","host":"s3://npm-registry-packages"}},"4.23.4":{"name":"@akord/akord-js","version":"4.23.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.23.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"020e23f348c574e4f4c6b6fbd10f7f0f49f9ff56","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.23.4.tgz","fileCount":113,"integrity":"sha512-3Rko5SDoL3je22DGgwLMcuXNBSYJ81WX6hw02QYMMxWo6hxnu+p9o0M1f5VPUlwX2EE6VLDOsWbBCB/WhyBdtw==","signatures":[{"sig":"MEUCIHXV2ryiI7yfvzRDT6EWeSv1jk5hPyHCTuKD936YZ8vXAiEAp3iAyqkUQ2UCnwNxDD2qS6c1VgwuYSGKBMpOUAcj3Sw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":334837},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"02639b0f4eaef62b9ed8d6b9a25e700f22be5fc2","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.23.4_1700146913508_0.9467548702266404","host":"s3://npm-registry-packages"}},"4.23.5":{"name":"@akord/akord-js","version":"4.23.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.23.5","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6cb0205676cb71e760f80d179cd6dee838034f1a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.23.5.tgz","fileCount":113,"integrity":"sha512-2dA6yz77Uvd8hOMtDvIXSC7xmXE1hiboyWKXRAL2tCBfYap8Y/xpKHxOiJNNS2N9jn7OmABV6Uz/jaSSFBr2zQ==","signatures":[{"sig":"MEUCIACmNRUgH+J3Dskz2zfWVga7WgKHpoficGLB42vAYRykAiEAyLZ/vFTfQgS+KOTcx1b7jRcX3zH7ebNVS9knkmOLtNM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":334837},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"6557f838b3de5dec4f2b0ef30742bbe04175dede","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.23.5_1700147256788_0.43423021561433983","host":"s3://npm-registry-packages"}},"5.0.0-beta.11":{"name":"@akord/akord-js","version":"5.0.0-beta.11","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.11","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e9553db1c59a4057ed975c2fbc7ffa8be83c6eb3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.11.tgz","fileCount":129,"integrity":"sha512-353X76z/NdnJcmXgToRE1X0tG5V6ng78cDRZjt89M0VvLlbCQv94h0RCOB8bjV5YYXZrx5r76SHFO9cmWgvwpA==","signatures":[{"sig":"MEQCIH0AtDVS8a5PmaFSlK8xHtuDS2Z2alhaMBgM+yRQdIjNAiBVVrpk2rKqoNJuJckzE0c/JpaqvfFYC6ZlfT1U90T1Xw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":373815},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"179547abba9dd2f877620cb3a553f5c48456d8ac","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.11_1700210095238_0.036929607781545526","host":"s3://npm-registry-packages"}},"5.0.0-beta.12":{"name":"@akord/akord-js","version":"5.0.0-beta.12","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.12","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ead7c83184a6fc01934b920c06f89984692c647c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.12.tgz","fileCount":129,"integrity":"sha512-W3wXI5Rv9dFruGP+NSI/cQ0jt965yXTb6reWzYUdXWpzyNL589L4153zjHUxDjgHs/J5w6WkGnCvTI+EHE7fvw==","signatures":[{"sig":"MEUCIQD2S04P7T1w3289HVIICy99wxY1/FgyZFV6ZlQUVPMJIQIgDWeuHYL0pm+lpNrho03LEQYAvw3056cdTpGsGMg523g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":373476},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"9d1160d6ae7f57b7a076f1a6b3bb6f5f50ca20b9","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.12_1700220598426_0.1622995484262666","host":"s3://npm-registry-packages"}},"5.0.0-beta.13":{"name":"@akord/akord-js","version":"5.0.0-beta.13","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.13","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"0c83353218a3c8abd453c3c4b85366538028a5aa","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.13.tgz","fileCount":129,"integrity":"sha512-7I9/1TyKLzINXRig9b0i4giTe+A2VBjqr7lAUto9ddBWjHhirV9/ij/LFdVo+XiDfnV7uWDAVHsWfbeOvO3sCg==","signatures":[{"sig":"MEUCIBb9CD+nFrY11Ya4CdyBr008Ba0Ts0NEwl56R+o3RsowAiEAwgdC9x0ZWMWceVCbpkRmUJ4NrmIlB8+FB6G87t1KcUs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":373531},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"fd74905acee33ba23cb29bd6f4304aa5c8bd6f59","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.13_1700496074374_0.36368751687775336","host":"s3://npm-registry-packages"}},"5.0.0-beta.14":{"name":"@akord/akord-js","version":"5.0.0-beta.14","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.14","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d968b329a2fdf388ca4d94d580b2524b5a3cad7f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.14.tgz","fileCount":129,"integrity":"sha512-d4nQW0x4Qw9d+idbNAtriDw4ue6TNJ2ZsALaIA0//ngYJ4iFBPZfVhvIXZfLjcvuIH69wGjpw/ThLkzeCXjkxQ==","signatures":[{"sig":"MEUCIHqkySOIvYLLRPn6DmSp+PtllhHt1q94lGgmPZXVKekiAiEA5X+sANRtZH3cx+EVxdPh2YJ1EGjpDWQDi4atDC2iA2Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":373650},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"fd74905acee33ba23cb29bd6f4304aa5c8bd6f59","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.14_1700497381125_0.8839804341559621","host":"s3://npm-registry-packages"}},"5.0.0-beta.15":{"name":"@akord/akord-js","version":"5.0.0-beta.15","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.15","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d0806b911c12c444d220839ae3830e82fe7015e4","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.15.tgz","fileCount":129,"integrity":"sha512-sp/w1UVQ9ATtt4sraLQh/LzZDDK1TeoivoHnZ+om5RCxruE1OoThqoomPCJeGyYjzPlErXyXwC3uL5jMveZBHA==","signatures":[{"sig":"MEUCIQDxSScDlgsYSWir25XcNpTIkj7HDYZLr3Tm5nfkTMZ9aQIgLbV2wUtKaQyxjpmxPGlYQQwwDkIwLb4GDecJJ4DiPTY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":373925},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c968815de3693d01617af1bc801fbdd916712a9e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.15_1700575830451_0.9887534434675518","host":"s3://npm-registry-packages"}},"5.0.0-beta.16":{"name":"@akord/akord-js","version":"5.0.0-beta.16","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.16","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a6a4f8d1a9c735cbb13f47cac25aba835a416e16","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.16.tgz","fileCount":129,"integrity":"sha512-BE3JC8EXZ8ATkMPyS99KfFbfcPHyM22SElJmEGj1loAVJyIbpp+UELNm4i4ZizB7wg4EbFjjQoOgvJwRx37WJg==","signatures":[{"sig":"MEUCIQCmRg+QCD+47LMz6f9D9Nk1qeE6FXH13kcb84B6VjFRSgIgMIwhslGefxz3ghKV4ihxTbYZi+FJNDa/p4FM2xbCp1c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":374020},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c968815de3693d01617af1bc801fbdd916712a9e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.16_1700580502770_0.5389544790406662","host":"s3://npm-registry-packages"}},"5.0.0-beta.17":{"name":"@akord/akord-js","version":"5.0.0-beta.17","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.17","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"934aa3d0e3e48f3d56f8bc95728fae879c86fcdc","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.17.tgz","fileCount":129,"integrity":"sha512-ggHdkpX2ObNa1sC3tXYOL6LnP6Uxico4wuzJsdwKxZBfV0oA1gi/uEJii7PAxsywsdWePhwY4eHa4gCo9RnHcQ==","signatures":[{"sig":"MEUCIQCP41tBEkxsx64Qj323XLteVxo8wXsIBKP8IC4b6KMXxQIgK0i3B9GPmjdoBQ8TFrX/0zADx2rBFCH0uhW4smbtv0c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":373953},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c968815de3693d01617af1bc801fbdd916712a9e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.16.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.17_1700677823988_0.29805804299486627","host":"s3://npm-registry-packages"}},"5.0.0-beta.18":{"name":"@akord/akord-js","version":"5.0.0-beta.18","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.18","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"0d15eebb82c4b1164448a97545aa65d7a086c05f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.18.tgz","fileCount":129,"integrity":"sha512-NDDDF376HmLoqk8U8fAyRFb8J4GpWw/dgN4sntSZfAMyq6Z4u/ZYbP61t/Uu0EeNlDY2pEjtuyeZ1SeIXUgdAg==","signatures":[{"sig":"MEUCIEW5uN3eOlOAyyc9vJpTmDb4Yq/qHa4y76zrAGMvuyDHAiEA2zmtLwOePr2sWtPHOQRNFYNh7/eaTISbUsBO3rJZfVs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":373953},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c968815de3693d01617af1bc801fbdd916712a9e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.18_1700678946330_0.10663534662656171","host":"s3://npm-registry-packages"}},"5.0.0-beta.19":{"name":"@akord/akord-js","version":"5.0.0-beta.19","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.19","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"058d413df390dc455fe64b905b636a1c115a2fad","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.19.tgz","fileCount":129,"integrity":"sha512-/wsJZskh9JjdfHoCe1farUbFHc9Qfm03JPYxJMzMXMXvkiViL6YFHEVn0ajVjc20qC0STX1EOdTsexsSzXt9UA==","signatures":[{"sig":"MEUCIQCJzUvAjFhAkAoUaoGS+pPZXUGfiabzgXXQUVaUhpvEWgIgUtCngzwlUt/zyPaGExn0sT+3C9TpB9dWZ9+VqMY7eM4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":374089},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"eeb535b3b52a580bbfcf6980a4c43aece80e9809","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.19_1700769824277_0.3434450454801852","host":"s3://npm-registry-packages"}},"5.0.0-beta.20":{"name":"@akord/akord-js","version":"5.0.0-beta.20","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.20","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4f7a9c08b72da31bd9f19794cec89f50a3fc1c30","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.20.tgz","fileCount":129,"integrity":"sha512-uyMpKEuh8ZOnnl74927SUt2Fst9qm2OjKYxblX34i52daeDtWzUuRSY1YrBsHydPk8tU6Ne2F8LsE9pTLbv4xQ==","signatures":[{"sig":"MEUCIQDuowb0Ag5jk5bO+Zea88cXR5aqlqef5NkY5gha+1yZ3gIgGI3/tje4ZjddqD4sOMnUshmVbY8fCDd6bZY1obrk1Z8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":374332},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"2653c522dfa8f12da52e0c3c7899b4740b0519e7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.20_1700772324482_0.9962369579479471","host":"s3://npm-registry-packages"}},"5.0.0-beta.21":{"name":"@akord/akord-js","version":"5.0.0-beta.21","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.21","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b1b32db2f483e315c737392621d2b76384f75d64","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.21.tgz","fileCount":129,"integrity":"sha512-5Ke21O5NN9Rz9iCN/I+CNFGQLd2vCcxnNMnVFF4ho6wX5J30ivI04EJJg64vQ/Df1NXg7R08EfiST5MvgMozdw==","signatures":[{"sig":"MEUCIQCyGs4P8aHix24hur1yChNPDi+HKfxFhwFrdXjeuXXbOAIgKI7k3bJR6jf3I+p/Wa2Xk5VnJ+TA+nTyqJGBCXPsh1w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":374208},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"4d3b1dc681c3adb02af48174cb18661350e9a146","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.21_1700819792668_0.8586034594730505","host":"s3://npm-registry-packages"}},"5.0.0-beta.22":{"name":"@akord/akord-js","version":"5.0.0-beta.22","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.22","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bad087c84736a7e017d2de17f2435094e6a73003","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.22.tgz","fileCount":129,"integrity":"sha512-cLy5hDkpT19WPat5GuDza4z0ml+ai5iS6INaVHtS7C7B+18G1Sn0xeqQdTZJCd/bUtdHNug+hhz23IXKGrtSNQ==","signatures":[{"sig":"MEYCIQCeBalRlMgn1soxLEkkcESUIpxSYpw0OzFzxky1A1cLWwIhANqy0GZncITYa4nGItDQDITxiMaRKZm13MC6YO+Ei9N9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":373392},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"28c8bdd0937acf6e2e8dcac8905dd9b0f0489eb0","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.22_1701435958754_0.235785910652746","host":"s3://npm-registry-packages"}},"5.0.0-beta.23":{"name":"@akord/akord-js","version":"5.0.0-beta.23","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.23","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"806b598a32b6510099d763498e88d934481be4ec","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.23.tgz","fileCount":129,"integrity":"sha512-rcgfkAV7FXQJRPBbHp0aTpdnz7arOXuig+mGfI6LVHtqSvfUGaQsHjMcXX3/EHOkTKMO0PtInfzj5DrGuvLFUg==","signatures":[{"sig":"MEUCIGEE3tPYY7VTnapiazi4v240ap6Zi1R+zmg7a732dAgKAiEAi6yVQRi82Ygerl45jK/Dg1fX7RKIH3AE7/QblyubnXI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":373397},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"790e0f728067466a0530272e51b9378f0f8a7e91","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.23_1701546285973_0.31833974008551325","host":"s3://npm-registry-packages"}},"5.0.0-beta.24":{"name":"@akord/akord-js","version":"5.0.0-beta.24","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.24","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3383f92b38455620f52ed4f7ba235461a935f54c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.24.tgz","fileCount":129,"integrity":"sha512-FMMoZAlqK+Ek4iBYDWzmQnMM1jJWwlqoRqSm2eWfK10uCVjTtU5M38yJiSDA+TiXCRlgJ9+q+njPwUiMY8GUQw==","signatures":[{"sig":"MEYCIQDwyqQwV/5207ScicglJJ3X3L1dkLedZdxghw+pT+nuZwIhAJ6Rf+IUn3rdpBttGVaGt8MrvWoBtOmP6yU2KFBcqjAf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":373624},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"60de0ff96586d29fea53ba6c0c710fc473409944","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.24_1701689438570_0.4384301561771511","host":"s3://npm-registry-packages"}},"5.0.0-beta.25":{"name":"@akord/akord-js","version":"5.0.0-beta.25","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.25","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"39d9ed96179386f95076c25e30cdd031f4c671ca","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.25.tgz","fileCount":129,"integrity":"sha512-rLzrSYZSaWNdaOrODEpLEi621ShaZeeSoLUY06CfYt9aj0sIEQPZZJ0knDL53s4fDxk3eWrNe2S9XDNSyG8WVQ==","signatures":[{"sig":"MEUCIQD+sxiKBEu+tFIoNbIPDaZsjhWkWsHx8TcGgfsRgVrDmgIgB2HBISC2NhrYRR8KEeBmJgqni6chJn7k3dR043rimRc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":375712},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"0c0ecb953cd1b7af98149516b738577992bc15a9","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.25_1701786144855_0.2615203075531003","host":"s3://npm-registry-packages"}},"5.0.0-beta.26":{"name":"@akord/akord-js","version":"5.0.0-beta.26","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.26","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"cedb22487a8ea577cce0263b661e8d29ec38c607","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.26.tgz","fileCount":131,"integrity":"sha512-vQp2tURN6jattE7VWA1nBAdXDMjoaiRBpiJ7EVLTvkXQa3juxJAoJJwtwSosbAkQVDHUB8S/z8AgPfVwOyytuQ==","signatures":[{"sig":"MEYCIQDNelngMz+MeB+iqKtTYwkMqajaObeLFUlPjZVzIKFKowIhAIexJ/xHwJ0beSMZST2JGnLmO65bj64WwDcXfAHQRpdt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":385319},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"3254618098181460f80de10bcfd1ecd01dcc14a8","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.26_1701982234946_0.4189113225426546","host":"s3://npm-registry-packages"}},"4.23.6":{"name":"@akord/akord-js","version":"4.23.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.23.6","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"8ad0fd7941fdf78f34b40e013e2856574b8ba3a9","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.23.6.tgz","fileCount":113,"integrity":"sha512-B9TKWyvUazBGoMMmO8PC8mGSOxAT5qkvoim5adYY30vuGMJEQGcjQEJFosH0L7bE06F3A+RHbdECOTMvvxPfMA==","signatures":[{"sig":"MEYCIQD9sXZKZDiOG/d3Rmp+eCQm7aggVxCLGDNJMS901QZ5IwIhAPWoMT4bc/TFOpn44buomr+4T9W864NkVMzUBKhSlbVz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":334932},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"d72d07d4dae751e5f5fc1e03a4a51245c4f2b444","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.23.6_1702036759981_0.2581765973687846","host":"s3://npm-registry-packages"}},"5.0.0-beta.27":{"name":"@akord/akord-js","version":"5.0.0-beta.27","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.27","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"88952981f34e73b4854a58cf796fbabe9fd32f92","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.27.tgz","fileCount":131,"integrity":"sha512-/1Fq9zTCbtNK/BdnCL3/6FjsaMNSmzjh+6ZKZ57ODS727Ni2XVhhc0iovUCMY5o+4qUhU74LCtgUkvCTgi9ucg==","signatures":[{"sig":"MEUCIFblhZ9ZbouUbPf7HowqttH3j4rTaSHAsuDEV9l25aP6AiEAy/6XkNnCbO5nBAR0nMxVuIzNBRDk2rRuVFafLERZAFI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":388257},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"265c8f093b0e03161c7c0340b82eb1a55763a01d","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.27_1702039720619_0.3393745528446763","host":"s3://npm-registry-packages"}},"5.0.0-beta.28":{"name":"@akord/akord-js","version":"5.0.0-beta.28","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.28","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a3b2f778dfaa4382819d67cef045ecc3f97cf6c9","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.28.tgz","fileCount":131,"integrity":"sha512-AEx4J+ayw9vwkHJzD7F2VrjxPgYA7ST4GM7locxqVPoFTxxRCCLkyYXKwlgQ85e/tfD3W4LtqPW3DA7acpmQ7A==","signatures":[{"sig":"MEYCIQCIGulsXLc3p9X8XS5WcfK5CU5yQEiiAj0OLK3JmiSZMQIhAP1o5VFMiAc2gGHxxLEjA9TDQiA7cux26HKnjbvDNYs+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":390868},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"265c8f093b0e03161c7c0340b82eb1a55763a01d","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.28_1702370117638_0.32484765913741276","host":"s3://npm-registry-packages"}},"5.0.0-beta.29":{"name":"@akord/akord-js","version":"5.0.0-beta.29","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.29","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b121fb35c66c63a3558745519ffda0bdf4049407","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.29.tgz","fileCount":131,"integrity":"sha512-CZhb3W+80vf01socMGZmiDQ+6DdHKHk1qJDnZm+HFzjNxlq0c3iIK6cFQQHhvgWjLdg/gA91ip8jvPOx29Yw/Q==","signatures":[{"sig":"MEUCIQC1ifQYcXwMhwxRg653c31pzMwMZWra+KWxnRtOBkVPbQIgB79lLKRG0V5qn/RNVRtzqEUU0tREbNU6SL0M/yhwYTo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":390928},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"265c8f093b0e03161c7c0340b82eb1a55763a01d","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.29_1702370683803_0.6779859459624844","host":"s3://npm-registry-packages"}},"5.0.0-beta.30":{"name":"@akord/akord-js","version":"5.0.0-beta.30","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.30","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ac76a739651b4edf56baaa42eccd8eafa95ae628","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.30.tgz","fileCount":131,"integrity":"sha512-C9qrbzWxOK56178F+k9CfCP325PDuadBYTP7OhqBgJu/J1kQkPsx1e8w2jsiiooP9wIM9XSv9Ge7oWFEt5Hn0w==","signatures":[{"sig":"MEUCIQD2WcCOCQ7ZqCuQ0U/tV6KQ3pmbBdZjb/VdFcu56hPRagIgT+q43Lw7QvW9qNMe5MnhPs6ZwAtdkpO+6TOxhvLjc+s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":391353},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"1a5f910d5a7cedec8fba2b16fe5abb04b53df150","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.30_1702372549397_0.034317063731406305","host":"s3://npm-registry-packages"}},"5.0.0-beta.31":{"name":"@akord/akord-js","version":"5.0.0-beta.31","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.31","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"eb07619d40ec04a75a0f16749daaec7eeabdaf0a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.31.tgz","fileCount":131,"integrity":"sha512-03aq1YGnWbiPgoSSuiKcQY6j2fPIv5cvfgyXmv5WlrCZtYyVhfMHa4PRzQ/fcgUtP49STle5GY9ZHE9s+mfq7Q==","signatures":[{"sig":"MEQCIDQMNF4c6mZzW3TAJVtqAI4wOGi3UrXY8RMaOMH8EF1QAiApTMypse4ljEFaV5krUluYL5TbXUiluXomnCI9E73Aug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":391391},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"1a5f910d5a7cedec8fba2b16fe5abb04b53df150","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.31_1702374837782_0.8141973626139736","host":"s3://npm-registry-packages"}},"5.0.0-beta.32":{"name":"@akord/akord-js","version":"5.0.0-beta.32","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.32","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9fd2a078e0b74e7ff8d2803cea924e400244d1b9","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.32.tgz","fileCount":131,"integrity":"sha512-bPywSa/lvEGcdzW3TWaa+2+gRvCLtcFfZZvEJL/cC+CEGTaJsZK2Emypj0OOfOneQFzYest5e8NhbRjgwDpgzA==","signatures":[{"sig":"MEQCIHPGHAUh7uj2skE0o2LklbpCP69wiDz+Ol7NjM/9Way/AiBaboCzRXNNyUxulJy35m5AnfaXv4No88TNygRlUJVgJw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":391620},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"0132acc8ac910331ab546287ac33a36ce494e97d","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.32_1702386450820_0.16268694540471373","host":"s3://npm-registry-packages"}},"5.0.0-beta.33":{"name":"@akord/akord-js","version":"5.0.0-beta.33","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.33","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"2dc5db9ae4ce6a0bc19a02bed44379a7cbaa947c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.33.tgz","fileCount":131,"integrity":"sha512-iF5n27XsLl4H0aaIDfY8XXNvOQ8eI8HdkHSVOGX4cofIT/4zTQaZz8xXxoBbTAxvPmP+LvBsEc2Yqozu5gsTbA==","signatures":[{"sig":"MEUCIQD0yIHrZ3lyrOWX9qLNlDnZTgTO7ZbYvZaJnImCaSFgXAIgOVJ+ZTJz2S4MTBd1YuOGo6Q/OAzXlAWAHiOBZi/ZM64=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":391928},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"832cbac9b529872fde0196ccdf3c7f6816e1b4eb","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.33_1702399492179_0.703560147972438","host":"s3://npm-registry-packages"}},"5.0.0-beta.34":{"name":"@akord/akord-js","version":"5.0.0-beta.34","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.34","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e8ce38d2247b3f2be0fc513af9dd63558700e74a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.34.tgz","fileCount":131,"integrity":"sha512-i4QZmiDdxqVaoTZW3ep/0oQYA+Ih1Dzx0wKYdWSLj9gl+QDf5j0XvMltAyFdqTKNY2Vj2qLZdsfKxVyMh81giA==","signatures":[{"sig":"MEUCIHeFa8PEwlr4WY1x/E+bLZbGd+pBKhKh019WJTq4AFzKAiEA2RcKFtaz6CNRtU4OApoxXhCMFBLPqxEAMZeBGcJkM9k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":391928},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"b738aa76ca34bce6ae1bb22dbe3c2b2b7d47a8af","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.34_1702400289891_0.5618107267549668","host":"s3://npm-registry-packages"}},"4.20.0-alpha.2":{"name":"@akord/akord-js","version":"4.20.0-alpha.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.20.0-alpha.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9365385e525bd3fa580bdb41a12f619e7791cd57","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.20.0-alpha.2.tgz","fileCount":107,"integrity":"sha512-6YECiiNf7ZgaD//3P5o/vhHZpQjOPfDdI9FY6vLfR3CTC3OopKqaH7azARd+jB39wO95tKP+9gJcMmIywRobLQ==","signatures":[{"sig":"MEUCIQDS1PAZjd4NZGzuOFrbR3mj6oXIFrZT0wsC27N+OmPnWAIgTg5IDMA55+wFBpNGkGHyQ/n18FInP4uCgTc7xloGJx4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":322694},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5262bcb9e22715e1650f95e6d16d541e4c9a56f9","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.20.0-alpha.2_1702642321607_0.24962336926147088","host":"s3://npm-registry-packages"}},"4.20.0-alpha.3":{"name":"@akord/akord-js","version":"4.20.0-alpha.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.20.0-alpha.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b03d2b43d20fa8a0e1c636144318a5b9dd4ce335","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.20.0-alpha.3.tgz","fileCount":107,"integrity":"sha512-ZLp2JsTQEHK1Lpi9mU8CKWkcNxDCeFyqX+t8VP/oH6UqY5MnuU+vYcExAS1Ue8PP1S71Vo+2o0LtE60AuNmxew==","signatures":[{"sig":"MEUCIGbxUBVJpZ0dHC36WGOpmMj2TCKS456gI2wZPR50i100AiEAh7xmxDXPuwe2LK3uGFYeSXZG90FctGE+nKvg+vWG0t8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":322887},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5a3b32ffc37769ea774b37ce3ec97613ee86c389","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.20.0-alpha.3_1702914615289_0.646763625177885","host":"s3://npm-registry-packages"}},"5.0.0-beta.35":{"name":"@akord/akord-js","version":"5.0.0-beta.35","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.35","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"92ca9e74b9cd3ee0bd9dc231b70bae60ae7ba53b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.35.tgz","fileCount":129,"integrity":"sha512-4xLeIo0JXMCtA4vKqKL2/70lttmy/LDwZQUZesKs3wvP4YEONbfxWshsM7TP43P+gbCpDjrBTdSshV+Gkkv+Fw==","signatures":[{"sig":"MEQCIGsbKWDNdC4zO3uNQ0cLv4isg/F18urb5b/lj2C5W8AuAiA7qD/Evf4hI8wGpKPpyXbFg6zUiIqDhSVI75/l6Bvj4g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":375891},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"3b6c5c6be8d4113213a9b2af67424c3e2317c2e7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.35_1703086471183_0.761301336789914","host":"s3://npm-registry-packages"}},"4.20.0-alpha.4":{"name":"@akord/akord-js","version":"4.20.0-alpha.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.20.0-alpha.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e3ce364ef995dc16455bb58593dbf2311414b87d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.20.0-alpha.4.tgz","fileCount":107,"integrity":"sha512-SVJZjRKMhH8xdifXBYoNalxXPxlzW8WbPieUqzrTu4BqLPmg5xbKC0XxuBkxbl4f6T8hzTFyEX4NLBIu/qoSng==","signatures":[{"sig":"MEQCIBlKrAaCPTF5P8Kn9UerSFgcv27CjP/D4T7+49siCMlvAiB5DqkxZ17OVQVVzh5WSHpPeplQIfRsoKzs/FREvQ4szg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":322890},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"0e848b1ed655bd87d9fa80f8abf4661a65dc5c12","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.20.0-alpha.4_1703095509722_0.7607261315321092","host":"s3://npm-registry-packages"}},"5.0.0-beta.36":{"name":"@akord/akord-js","version":"5.0.0-beta.36","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.36","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"88f9bae7ee505c55fb7bf6e17498ac98edc99b45","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.36.tgz","fileCount":129,"integrity":"sha512-A621tPpUXcUnxcsmrZZTNo6xOtcATHcwj87LZlLBgGnMWJ6yXKSyGdnq9umzCebQQHctWX8BesYi2RsqDa+Sxg==","signatures":[{"sig":"MEUCIFSUeJIj4xcIz87LtKfzcBB6DTbkNwJwZ5SVlu9h+w+gAiEAlX4dLluD4dWXCwAF4sjOoPWSnf/pY6axvkEBG9tK68A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":375916},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"3b6c5c6be8d4113213a9b2af67424c3e2317c2e7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.36_1703179811488_0.20661336063899216","host":"s3://npm-registry-packages"}},"5.0.0-beta.37":{"name":"@akord/akord-js","version":"5.0.0-beta.37","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.37","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3dad0113974ca9c20f75ec7c1ee3eb9d728390a0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.37.tgz","fileCount":129,"integrity":"sha512-Dyu3Cb/xscOUO69uttaJarsgp/1/roi9wkAijLmvq62QFonV7vvilOmvdar/StkQf16D5TRBjC9VeEqJ55g0LQ==","signatures":[{"sig":"MEUCIDybIcECeN260ppfHohuQEfztFhBdIQt7n5wd0oYidDiAiEAgPHT2ia4/kbsowvXB4HjNrPjsKlPUVcKXIA5r0z+3SE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":375906},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"3b6c5c6be8d4113213a9b2af67424c3e2317c2e7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.37_1703181480236_0.4041165030175873","host":"s3://npm-registry-packages"}},"5.0.0-beta.38":{"name":"@akord/akord-js","version":"5.0.0-beta.38","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.38","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c7c5df82df81d9baacf27c8fba2a9262e2f31893","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.38.tgz","fileCount":131,"integrity":"sha512-Dy/xcZWvrj9wtEn4EXdy7hjoE2HiMxn26WqfBqlY9yjEnCMin6iKrwjJSNkIisxXolvcdNJj7Vin2dT0RnZshg==","signatures":[{"sig":"MEUCIQDEwOSvOf8zoKxtowMjzs87vcz6Y4jLnl/rHogCFLf0hQIgQQzl4cLRENpFifIbQos1RV4fJUUiuIInHOXF0siFLyQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":392594},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"fb11f51f3902821dd9b445480545be7e82db643f","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.38_1703183317831_0.7745608678037321","host":"s3://npm-registry-packages"}},"5.0.0-beta.39":{"name":"@akord/akord-js","version":"5.0.0-beta.39","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.39","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"656285c0dc99dcec933f36a6b57973517a966836","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.39.tgz","fileCount":131,"integrity":"sha512-eBBKi9TqQMXxsEOkmUhyTu+3y+v3pWcoCyr08731C4ZHCDdTNgu9cD3C1RCZA6xXWfulepyqHkxBR4X7LeV1dA==","signatures":[{"sig":"MEYCIQCMgOrVvpzwKn/RsMacUw2S1vuyaVej7NorI/eN2SsdCQIhAOfoFzNePvbzcltVuucrbiP2quGcC9eZTv97g/DKqF2v","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":393742},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"69db7c3bc3d43878326327fecc6a78ce363e904e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.39_1703263121649_0.8631577877778787","host":"s3://npm-registry-packages"}},"5.0.0-beta.40":{"name":"@akord/akord-js","version":"5.0.0-beta.40","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.40","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"35968ea8eb2349b7363225d32fc4caa75eb520da","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.40.tgz","fileCount":131,"integrity":"sha512-uKfAvHvTyDUN73StudbsejnMhpiviz3LihhaMsvMIzqchTg52XUNDQ+PcasW9/O3ABW1EjS3GAEIhxWrAIKvkA==","signatures":[{"sig":"MEYCIQDTSlShI4QotG8TjRbes2bANm3ZxF/XaaGCaSjKK+7w/QIhAI0lH7EPjIAjEi9X4NbtHhXpiVVNjKHupCnz7GEaGvgE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":396068},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"d435a27688b0571e88b95223ab9903609d841198","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.40_1704804871624_0.4202489409689458","host":"s3://npm-registry-packages"}},"4.23.7":{"name":"@akord/akord-js","version":"4.23.7","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.23.7","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"bd0598fdc29830b23ed41b80bf9bb24b1832ebd5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.23.7.tgz","fileCount":113,"integrity":"sha512-cF6YO8hquruuIs39yjueK022SUgXnDc9WjH5Nkkh/yE+qyLFShTD11wQkMEr4CEeLbL4hBQuCVH1OKsBW0uEXQ==","signatures":[{"sig":"MEQCIAHO9jayi3CO8TBI2DUBGaHrWvKbqvgaO+dR9KblEFVpAiAijP+JeTdFirzNQ5pObOGEbZMJk+0/wzcxxZ7k9t2Slg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":334932},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"30b44e615d1bae1feb2e8d2251db6fa138169b19","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.23.7_1704818663119_0.18552379389811757","host":"s3://npm-registry-packages"}},"4.23.8":{"name":"@akord/akord-js","version":"4.23.8","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.23.8","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4fcdf1c98795733b375e5da0c84d0b74a66352ed","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.23.8.tgz","fileCount":113,"integrity":"sha512-eeP9t953oArAz5Tg/wLImHeY9INgCUH9cmAE0h35UDQBjAncFpeWlrCbRLpCNDRtZ8oon5hlw4LqAv5l4rL+PQ==","signatures":[{"sig":"MEQCICos4IYV6d8357Cs7yagJkve/908O5vhNesVrs8mv2a9AiA+X5CVNgPGhTiKDFwml07IKA67mbqmepXk08Nx+sk4bQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":334962},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"3961a766784498d69234e13b3c0240da107e98cd","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.23.8_1704824316603_0.3590505304212155","host":"s3://npm-registry-packages"}},"4.20.0-alpha.5":{"name":"@akord/akord-js","version":"4.20.0-alpha.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.20.0-alpha.5","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"394cab0a642789c7c72c437ee4d11f9036d77328","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.20.0-alpha.5.tgz","fileCount":107,"integrity":"sha512-JAYJqTfkEi7WK+Ky3bbJPD6Okz5cZkYvNWULLKkUuWm1tP/r3EjFWvYiRFqpFInAswQ169dHHUSoiXo/L7I6zA==","signatures":[{"sig":"MEUCIEb8upltsgVnXcehzQxjtH/w0uCcB+3k5SXZUNIlmWOLAiEAjXHQzjkA/xwnqA9CSPftydKAu6mKsw+4lT+PdZl0tyE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":322926},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [File](#file)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest arweave uri by default\n\n- `stackId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n### file\n\n#### `get(id, vaultId, options)`\n\nReturns file as ArrayBuffer. Puts the whole file into memory.\nFor downloading without putting whole file to memory use [download()](#download)\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `download(id, vaultId, options)`\n\nDownloads the file keeping memory consumed (RAM) under defined level: options.chunkSize.\nIn browser, streaming of the binary requires self hosting of mitm.html and sw.js\nSee: https://github.com/jimmywarting/StreamSaver.js#configuration\n\n- `id` (`string`, required) - file resource url\n- `vaultId` (`string`, required)\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n#### `getPublic(id, options)`\n\n- `id` (`string`, required) - file resource url\n- `options` (`DownloadOptions`, optional)\n- returns `Promise<ArrayBuffer>` - Promise with file buffer\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, name, content)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"b182800e7a1b2a59ced1ef2676be9d150ba95fff","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.28.0","@akord/ts-cacheable":"1.0.11","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.20.0-alpha.5_1704977306365_0.6335781380354184","host":"s3://npm-registry-packages"}},"5.0.0-beta.41":{"name":"@akord/akord-js","version":"5.0.0-beta.41","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.41","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"65823279457ca25b63d9e75d2d5bddf1a10da31d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.41.tgz","fileCount":133,"integrity":"sha512-IfRP3KVETjLkwhbKeKju4gbh8xN7O7JbA2giYqnDxHm/Z+znS+Xfi3752OAKJHnI9Z5msFUovqOOW3zouqahKQ==","signatures":[{"sig":"MEQCIEtwj44dy5k0EkvxdrE7gkqguZHm8LW7zvtCyQB9Op5qAiAUmqSOuRoeTPv4xHDMnydnUg7HbWmhPBRdVF9kUyoDXw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":403786},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\neach NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { collectionId } = await akord.collection.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(collectionId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"9ed52ddbdceeb6bdbb36a7b87fa85453e05812e9","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.41_1705003772267_0.1386132163928493","host":"s3://npm-registry-packages"}},"5.0.0-beta.42":{"name":"@akord/akord-js","version":"5.0.0-beta.42","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.42","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"0e131fc10b12e0d93f2202b3442cda66810a272b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.42.tgz","fileCount":133,"integrity":"sha512-5dAIa7dZ1ZEZSwJXZI4ex9++CItW52QtcQjRkb5CX86wfTN1gxA9AFK6LqgZ3K/GxsVZf6eMSvuvrZR6NSCpFA==","signatures":[{"sig":"MEUCIH5hZU2NORtCQTmlfiDau5D58135z8ww4MhEi7aa0KfAAiEAyyL9xBYl8XDxzVIT1aKcWuc1Xq0Hah7FOtgtqlW3wpg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":399840},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c00da6ad0171e98a9cff9c3de9d0fc03ecb86b0b","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.42_1705055089097_0.193576869872788","host":"s3://npm-registry-packages"}},"5.0.0-beta.43":{"name":"@akord/akord-js","version":"5.0.0-beta.43","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.43","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d31ab1c9867956250de6f98c1034695c8c0a3ce5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.43.tgz","fileCount":133,"integrity":"sha512-4ivzYbOliL6BkIGnWqnX9A8SS2JYf5/+vaGI/rJrZDXT1wZJalh4+uICJdZZDCyLTmPBwqqTDcRoRmbic4YvcQ==","signatures":[{"sig":"MEUCIDFWYRbjhEMGKhIKdPaOct5aKoD/tpmBW48qUbKSIbctAiEA/U/eGl4wzVKAiXEyQM7SjE3ra1Fw9CRw1fKQzUj2t8Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":399822},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"80f9acd2e92f74bfafc4c2bb88c3a15f1306424a","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.43_1705056247641_0.46407815155346843","host":"s3://npm-registry-packages"}},"5.0.0-beta.44":{"name":"@akord/akord-js","version":"5.0.0-beta.44","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.44","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5118b23f91e2db5848a83939eecb3665a51722a2","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.44.tgz","fileCount":133,"integrity":"sha512-vZdvCGurZqVRQv+wkhUchFPmJVKbnLw63Cum9brDbvA5i+uFFG9s6YL48syvDgOqTRIfK4saf36P+FOELLS+aA==","signatures":[{"sig":"MEQCH0VPfBln6FwFTh4fPYgBuU1K7igmwToSZhmbXjqiD2ACIQDAOsgbORGFEtsgWVF+VwBnF8tcRImiAxh6Epd1IrSGvQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":403545},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { collectionId } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"a7117ea382ce322c55b74db079589f8c1398a08f","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.44_1705061793578_0.6439873323794887","host":"s3://npm-registry-packages"}},"5.0.0-beta.45":{"name":"@akord/akord-js","version":"5.0.0-beta.45","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.45","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"262dff56666a53770b8ba195e5416d29bfcfef90","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.45.tgz","fileCount":129,"integrity":"sha512-X9WK4MDKB7/ERweIJ7BKdtm0+fuobtYTNPQqth4zA9RLuT/DC+Jm0WIYXftn/Yl1jq4hL97yO7Sk+ftgDyxCXA==","signatures":[{"sig":"MEUCIQDAmg6tbr09dwJK942dDgtqJD8rIZaRh4++smM/8L/lpgIgP2iZrvE0IbxoqT5rcPysAf09Bo/gMzyJv6nJTqvbcnc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":375351},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"58f3501af4346c40fb17ed8c481c73b27b8b117e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.45_1705082277946_0.19575159994490887","host":"s3://npm-registry-packages"}},"5.0.0-beta.46":{"name":"@akord/akord-js","version":"5.0.0-beta.46","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.46","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"38e23d80e4f6b0210543bc236ccb89d5580b8df1","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.46.tgz","fileCount":129,"integrity":"sha512-JwvoF0qFx7hoWG7igKGBAjDDzt9Is4rST+s2CdnYh7QEWBWWhz55Rknd0HR4pieSw0t7y5GnNaz/R8ODSTMQsQ==","signatures":[{"sig":"MEUCICx5UHcmjg8YLUNvFhzFDlS4NbqyxKFwdxKOv35EJcJIAiEAoMo78xSC2+yV282SMveVJSCPPdw6YfX6JXvbCFXdYEM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":375049},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"9d9ec0bdf3a7944e3961bdce535ffd63c0cac2d2","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.46_1705322347421_0.1188099509357714","host":"s3://npm-registry-packages"}},"5.0.0-beta.47":{"name":"@akord/akord-js","version":"5.0.0-beta.47","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.47","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f08380c128ef7bd6159e97462cbedb9c24453fad","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.47.tgz","fileCount":133,"integrity":"sha512-mlgd7qhN/f2692GAYluoGekTMEySXH8YW5LrE/DKbJ1PH2iKIxfFkkEVqd8a91H4TFpW5Ke8ZqektRR/QtbI0g==","signatures":[{"sig":"MEYCIQC4sBaGQu0EA6+PF+Ew+qLzA2HXvxeYw0Wqz0m0oucV1AIhALqw/7xNVesVAi26cnZWIzYhONCXN3yjOflhuIyShcWO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":404364},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { collectionId } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"dd9fe523f1d9e2eb002450d4bcb9ae82ef6f1ea6","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.47_1705322478199_0.489376319321976","host":"s3://npm-registry-packages"}},"5.0.0-beta.48":{"name":"@akord/akord-js","version":"5.0.0-beta.48","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.48","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"599cf8b1608aafd01fb18cf9b07f1db7f82d4e29","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.48.tgz","fileCount":129,"integrity":"sha512-9fBQrBl4x9I514B+rbtVKC9sRgNiBt30MFfKL0JeyFPgjkyf0r3RWW0rMqSEsgCH3GCsAqyelJ/fpdh6Fv/pBg==","signatures":[{"sig":"MEUCIQCh0e5M92bsRqAkbESJFT88rq5PMCC/6q3nWJZLDNmVjgIgX3v1Q0TzNo5irQBiJpVotfnEq7t8BnoiwL1zF6ZpR0c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":375041},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"9d9ec0bdf3a7944e3961bdce535ffd63c0cac2d2","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.48_1705514678261_0.8609284539310988","host":"s3://npm-registry-packages"}},"5.0.0-beta.49":{"name":"@akord/akord-js","version":"5.0.0-beta.49","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.49","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"52a45a7505139daea50ce819e76dff2fe4895e73","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.49.tgz","fileCount":133,"integrity":"sha512-o3BFTmTHWiXyOAEo8BIT0fik1I0QAVrRsTc50t6LTJktQv4uZMEtaDoNFiDOiMGaDRAR+uHKwCcVAZYEP5yGeA==","signatures":[{"sig":"MEUCIHPf/wjGz0RNZYoatAIHxsewz/G8Bk0xNBeLDFBjgh/jAiEA55tMMTtxWyP8sWlV97IvznUWTFKKpPQq/7DN21+4WW4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":406592},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { collectionId } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"ea4d45be3886c7e32ae870397f366f33b822c871","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.49_1705670714138_0.11431982303163357","host":"s3://npm-registry-packages"}},"5.0.0-beta.50":{"name":"@akord/akord-js","version":"5.0.0-beta.50","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.50","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ca0dcc726c2cc54b48c35fdf2c79082164bd4006","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.50.tgz","fileCount":129,"integrity":"sha512-tXzTFekBWR7eKdZ6SQSraUJWMCVKnnjZlflMGx9QzR4bF4xFeVJjld8fk0YCv81+sxt9fNNKp7ojyV0PhI10Eg==","signatures":[{"sig":"MEQCIFP+7ziicFFq3KvxlRnFiiq7loGroG5ecZ79QVHzwShfAiAw1ihngjbLQPi0B9BG8klrJ5kWxbAqMiK82rk5pRvHlA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":376740},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"931597c74e05aa5aa735228057f5a3deb118e846","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.50_1705684688123_0.8125188955393363","host":"s3://npm-registry-packages"}},"5.0.0-beta.51":{"name":"@akord/akord-js","version":"5.0.0-beta.51","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.51","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9798b1cbbf8b7bcced82cf9cae4332e9282cc59c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.51.tgz","fileCount":127,"integrity":"sha512-Rq9x9CGcy1s3T6X97t+g866RKdz7v1lPkK1XExbJ+0ECEoYy0A2AwEqSSRK/mPjd4aZo8iFcP9Xw7thppay0yQ==","signatures":[{"sig":"MEUCIF8fxvjChX4mctJgYw1BcJI+pirxEeRsMIOekCF2iNdEAiEAqxGCI8IBUgMN4RMKOBhzJQp5QLVU0+jQLpNUtNdXbfw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":362222},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"9c20a0927ab288f3c1b4bf31a14db26cb047c02d","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.51_1705920862544_0.0929435269303931","host":"s3://npm-registry-packages"}},"5.0.0-beta.52":{"name":"@akord/akord-js","version":"5.0.0-beta.52","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.52","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e754dc4afb6512137de057da576c6b3a43b214dc","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.52.tgz","fileCount":127,"integrity":"sha512-ILc/oUTlGeAUe8wYueNlid4PHNhZqcN5941e7Qx/0PI5H2yUuCtp43ROOVZxY6XAJq3Gko5Lh1E8ILS8DsN3gQ==","signatures":[{"sig":"MEUCIDUz1VdT5RxM6AG8o4Fxs9qxcoVVmP2lTFKllP7VxlkbAiEAz8f20VP4shTmBP2Sit+BVHciZS5CaKZETEAkj/+WkPk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":362636},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileLike`][file-like], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"d13d1f18ca22fa115d7592eb482e295a73371faf","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.52_1705932955534_0.09582031604607666","host":"s3://npm-registry-packages"}},"5.0.0-beta.53":{"name":"@akord/akord-js","version":"5.0.0-beta.53","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.53","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f46a8b57abe22412a0f61a28edbeb503763d1351","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.53.tgz","fileCount":133,"integrity":"sha512-sVEUEe8I70zrIiLbMa1gtNYWKgtE3oLzNP9TR4tvTj96eMOkg7AxxegV4qw8Q+eBxWzBtsnHiMYmoA03WiV+xg==","signatures":[{"sig":"MEYCIQC1kl2kE0AaJ4TIx1KC3vrq0e1jDJ4d5LU6cFeCY7dnXAIhAJd3NS5Urgjt3ZoehSJPe93Zflk6pr9z4YO6TbcOgOo6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":406589},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cacheOnly: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { collectionId } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"fb50d4043277e7a33dce1c9bed7875c6efe6957c","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.53_1705939816597_0.26149627782206575","host":"s3://npm-registry-packages"}},"5.0.0-beta.54":{"name":"@akord/akord-js","version":"5.0.0-beta.54","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.54","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"70534e72b41e3b3f7c3ccaa6df7c686834b5ee90","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.54.tgz","fileCount":131,"integrity":"sha512-Xj7CGaSEjcc9EVbgVlrejflMC7+t8azChmzBS4Gx5+GhihGsALjlPOOAecyqy9iG/c9B0tnIDKcTifr5QzhVIg==","signatures":[{"sig":"MEUCIQDgmJTHCcfXaTpluClzYdaZ92O24ZNhPHCfswaDHI+7YwIgELdC1s+RTRGx8N2xQ+yLQ19WVar01kFC4t1sJFiJf2g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":392278},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { collectionId } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"4f41e98582cb3ef21e1870211b85fd752362c8ce","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"kgracki","email":"kacpergracki@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.54_1706195918646_0.8927298317615999","host":"s3://npm-registry-packages"}},"5.0.0-beta.55":{"name":"@akord/akord-js","version":"5.0.0-beta.55","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.55","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"62c422745c0f32544d5184c275073b1bb2eed70f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.55.tgz","fileCount":131,"integrity":"sha512-gDsvj0D9G1pMbHqObaRX7o/ZQjz1/MyWKx71Xck/20Pj+jmTRlktTIC9yBKsV4tj251F782QSnF12yWEbVwy9g==","signatures":[{"sig":"MEUCIQD1sERz18BMsuEjLTWG8Hji0DLHCOZWz+GS6Ues9H8D0wIgDBG7g7JKBmk8rghmoX0Yc2gMTwNyb8vLiSq7ydzvAdk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":392103},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { collectionId } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"8c9877b10c6f61e694a500e9cb4e5bba7b108fd2","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.55_1707145983918_0.9730535505071731","host":"s3://npm-registry-packages"}},"5.0.0-beta.56":{"name":"@akord/akord-js","version":"5.0.0-beta.56","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.56","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"81ce352ac0267fa8767e8cfd36e266dc292778be","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.56.tgz","fileCount":129,"integrity":"sha512-apVU+zSlRfreT7iVqrIc5ZF3Z9biEEgLtoNbKAr8YpFQUaLE22yVxZNxKmu6U/RdQPJm09/rNOoISP6NL1lhcQ==","signatures":[{"sig":"MEUCIGc+g4xXmZJ3WRp+YeM6x6YkunfTOmeOA7oZ7iKWZus/AiEA8orpHTfbvODPO5wV0XCZtTtplK1UidXLFke1Ry0b7NM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389891},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { collectionId } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"987acbbee73cbfcf606f29a6b29b3f8e33cf6457","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.2","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.56_1707149037920_0.24310837114918327","host":"s3://npm-registry-packages"}},"5.0.0-beta.57":{"name":"@akord/akord-js","version":"5.0.0-beta.57","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.57","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"0ce2fdaeae64046ea0ae9c4839a07e488b35a810","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.57.tgz","fileCount":129,"integrity":"sha512-JJ+5ppNM1DbMNcOVBg9+bA+ygvy2zHgZ3WoN62Z+4RMygJ0W/4XpnNTi2WqVZidooWtlEw4HoebrPvQeO3K1lg==","signatures":[{"sig":"MEYCIQCzuBWcd+qK38UdScVx0V+VBbdW9zJbdIrm/l3pgxhOTwIhAP5EhYGcmZx3NBDLZZj+2dnJkG+71JlXWcZKXMRAzGgt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389891},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId } = await akord.stack.create(vaultId, file, \"my first file stack\");\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { nftId } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Let's retrieve the transaction uri containing the NFT\nimport { StorageType } from \"@akord/akord-js\";\nconst nft = await akord.nft.get(nftId);\nconst nftUri = nft.asset.getUri(StorageType.ARWEAVE);\n// After few minutes, you should be able to view your NFT on: https://viewblock.io/arweave/tx/{nftUri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { collectionId } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"7272d30f4a440f72cd65d906f5a4b3299011e023","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.57_1707314857637_0.25994259016109345","host":"s3://npm-registry-packages"}},"5.0.0-alhpa.1":{"name":"@akord/akord-js","version":"5.0.0-alhpa.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-alhpa.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4db78cdd3639301878d436d0bbe189924ff4f6e8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-alhpa.1.tgz","fileCount":133,"integrity":"sha512-4BJMrKgGv9VZc8uTGyfgYsN3NobCuVM3Ji9wGSBKjOWU3TpD6ikiX2ayo+jC5AHhoZX5vMxGf2pUyZfvPwET7w==","signatures":[{"sig":"MEUCIQDn1VeG8PsDo+LTWdY9c/gkDUHyDRYNrtolEVESLeK+AgIgI6p5lVXtLANU3ub340o7TRLGVCTQFSg9siWPy2apC40=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":399992},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"f3e03a89e09ac68e93820afb5532859265ba287b","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-alhpa.1_1707479151237_0.5114031195147524","host":"s3://npm-registry-packages"}},"5.0.0-alpha.1":{"name":"@akord/akord-js","version":"5.0.0-alpha.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-alpha.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"109961406ee04580a4a26c55e520070695120278","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-alpha.1.tgz","fileCount":133,"integrity":"sha512-SRgZqCEjEymWN0YoqhQ54dA1fVwck92uUTSwAQgEXw1X1xN0e97uTe9jHpVysZIlg1ZzdivB3z4l11mQGjgcAg==","signatures":[{"sig":"MEQCIFDg0amYR4yAqfvLVsMhAKPp10JjNaaSWFuwetU/KTPSAiApqh8SDAVWyW8AebjjJSQ6VA6rMS6Chc93ZcR0BkozjQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":399992},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"f3e03a89e09ac68e93820afb5532859265ba287b","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-alpha.1_1707479199442_0.2863050134189793","host":"s3://npm-registry-packages"}},"5.0.0-beta.58":{"name":"@akord/akord-js","version":"5.0.0-beta.58","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.58","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e1abb929c5af2b458f43af482581ac920b6f53eb","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.58.tgz","fileCount":129,"integrity":"sha512-cBcLcgjEJzBQmY0OO+yUDAVxTQlNVSvn/PS/OguB1G04V5gE6OFVbfhmJK/hbYdWj5hKUZ1Ph0GFEO3Iqg7/Xw==","signatures":[{"sig":"MEUCIQDNVwM8271642Hi6J6HLlJp+IDVxr8erL/BNp9dc/ul/AIgcJfC6/LTbigsmA6S1ydsxWhRv5QdOPwhHTZNoA/m0kg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":391236},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"92ce24898f8c3a420d126fdd76e1855f381c73d1","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.58_1707479317855_0.4777263719531739","host":"s3://npm-registry-packages"}},"5.0.0-beta.59":{"name":"@akord/akord-js","version":"5.0.0-beta.59","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.59","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"4060d3065beaee593ee8b0e34632c5a7c293513f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.59.tgz","fileCount":129,"integrity":"sha512-5ce953zgXpKlRjg0ah0aezPyZWwVhlGbCLA9PUp/At0wZXa+/j9PYxj+Avoi1OQxk/KeDN8BkI6vODyPKhiFUg==","signatures":[{"sig":"MEQCICC3+NKnttdD88mdmsm6E3xjwOzR3pCmEyJXTX1JBpJdAiA5zK8YwNbLxsOIeQr735g0e6u7bU3Tc7AkwMw0lFARzA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":391225},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"3cfbf7b972a250fc20aa4d40e3f9080ce8ee1fa4","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.59_1707502737998_0.19824245960197073","host":"s3://npm-registry-packages"}},"5.0.0-beta.60":{"name":"@akord/akord-js","version":"5.0.0-beta.60","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.60","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"09d3628411446cca697795d4eb3070ac5d582ae1","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.60.tgz","fileCount":129,"integrity":"sha512-ALQJgVbhmd5gkzh0im8aAma143AxPxtA/TSiq60Cc+RhV6xEzuI6o+xxon2IHHMZrfmD7x2WTA/+4gI+n686+Q==","signatures":[{"sig":"MEQCICHm8ZzsualbXEH8V9nylf0XLvfOhv/98QP7aZSbjwVOAiBnQugbcJFQ38H1hJ/hTM880a5uLrPUPFL0ARzmVUw4Qg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":391203},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"0048d5c7407e1faf8de30d501c43bc2481781883","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.60_1707738904497_0.003420463180130673","host":"s3://npm-registry-packages"}},"5.0.0-beta.61":{"name":"@akord/akord-js","version":"5.0.0-beta.61","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.61","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c7d8e456d5e0d0ce5cc214304a6f151a0b2c4d51","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.61.tgz","fileCount":129,"integrity":"sha512-Z/q4uHEdY73sdET9uDjoMvd+089IiBmTPsYycULUh0iuV+szey3ymhkFtfxu7BMIx0TDVbfcO3qZi1i6kNOpsA==","signatures":[{"sig":"MEUCIFrA7osFtkxphbTU0KDhYOgWo8AucBx/sA7pKnma2AKKAiEA3CksRVWjlRI5lrlNgK90DsAS29dJ7lcBv/i93xc4nkU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":391223},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"0048d5c7407e1faf8de30d501c43bc2481781883","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.61_1707896738106_0.7938242092801411","host":"s3://npm-registry-packages"}},"5.0.0-beta.62":{"name":"@akord/akord-js","version":"5.0.0-beta.62","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.62","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"0603ed622220ce2e85e3255212cc4087c72bc37a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.62.tgz","fileCount":129,"integrity":"sha512-CoO47t2b54aS6SOuFO7yioKegBx8YrL3SO243CYXTkYh2faSDXCjWGaBHCBzOmzXkTNEm+o+dvI616GNNL77Iw==","signatures":[{"sig":"MEUCIG1soxWT285tvg8mJkG2hutRjIYXTnlTE4P+GzIwh3swAiEAy5cvbIvzpCe/HXyBSRcmG+mxeln3qxEiABZE2fHCVUM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":391266},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"0048d5c7407e1faf8de30d501c43bc2481781883","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.62_1707905481341_0.9700936330640311","host":"s3://npm-registry-packages"}},"5.0.0-beta.63":{"name":"@akord/akord-js","version":"5.0.0-beta.63","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.63","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"2e817508e4f8f6ae0ed1595c59fd30820665b11d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.63.tgz","fileCount":129,"integrity":"sha512-4IVatLY+6Be4INv33l6Agr6THkKrQkOaoUQSdN8sQbJ9R/nEwPns5hsprqOU7x7hmkvgUrIIARO/6MTsqsfk6g==","signatures":[{"sig":"MEUCIQDfJiyJq6PTBEuBF4uWVruZXM4jnUA2m5eh45/d+rkYlQIgArpVyS+YOuDe88TMgBfAK+FCVspkM0cNtQd4DJWxpMo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":391263},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"0048d5c7407e1faf8de30d501c43bc2481781883","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.63_1708001103761_0.8107371859327546","host":"s3://npm-registry-packages"}},"5.0.0-beta.64":{"name":"@akord/akord-js","version":"5.0.0-beta.64","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.64","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"489d68f2b0a745471520290e29c831b2df525626","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.64.tgz","fileCount":129,"integrity":"sha512-6Ky8X9BSFyzw36ryJc1863H1pMzCNDwN8S54XGm8spthfitFgljdHkUnp9WHpD+o/aB2C3UopbY4L/0MpxfrRA==","signatures":[{"sig":"MEQCICEK8wpcLD+JVm+2PBFgW3ihn3ZwPAeqTEeufC14id8oAiApYBt9tqBdbrzShuYYjzhRoBCw72BMlxmnHChxGC++OA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":391397},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"a01258eb6dfd5025a843f83efb7f3f6ac7aeea6c","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.64_1708082357983_0.20802511468862428","host":"s3://npm-registry-packages"}},"5.0.0-beta.65":{"name":"@akord/akord-js","version":"5.0.0-beta.65","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.65","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"173e06e59104b4315f5cf422a950e985580bdea3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.65.tgz","fileCount":129,"integrity":"sha512-dz9me8avrWN848C6aggbIy9TufkntDeCainZLk4RLMBIFwB+KnLRQeEOAzS1sXwCl6a5XR0sIUvzFAvzNVj6Jg==","signatures":[{"sig":"MEUCIBGWWNsPcKJAEO5r8iBUw0yyVJ26PmGNgIbvydUDfd8DAiEAq/YTZ210YlSj3ryM7uTOkPVasstp7CNKb3SOW92Vndc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":391375},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5760c387cdc604e7b455971f52274d651b92e80a","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.65_1708084565063_0.10888575463138617","host":"s3://npm-registry-packages"}},"5.0.0-beta.66":{"name":"@akord/akord-js","version":"5.0.0-beta.66","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.66","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5c822c47ce25296131fe2081dbbb303b2cfefb64","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.66.tgz","fileCount":129,"integrity":"sha512-/KUwSQSapbclPF9WmakX6R42LIdxMU/kiFB4JbgpI1YGzluDFmkuJ3Fd+7j7ab3H/oPak6/Q5pY3Htq4wPmlww==","signatures":[{"sig":"MEUCIHEB4KmVisSdv0rWkD2f1jz58ckkPSkJx1FK5tKsGeecAiEA6H+cQIOh5rDd9N05sW4BmrbA7yfSMXApr3f1hHgs+e4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":393818},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c2ca6c69bea447bf6eb66ae5327c96849920f879","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.66_1708111181460_0.4288732828984836","host":"s3://npm-registry-packages"}},"5.0.0-beta.67":{"name":"@akord/akord-js","version":"5.0.0-beta.67","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.67","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f70fba94ffcb8323c39884811036282a22617d97","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.67.tgz","fileCount":129,"integrity":"sha512-A3fC/2IUavVDBvPx86EFAJakAPyyPTbyzOrwm1BTCPQiPMRTNRKGBgnOae94Ijz5ULoHUfDkppewyLck3xz9fQ==","signatures":[{"sig":"MEQCIExlkndQ6BVOobL1CjyTreyKU/4el+KCFXZe+No96PbJAiBJhXXRJ3JL8IMEbabkg2yixWySwZlExmVfJumgYJin1w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":393790},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c2ca6c69bea447bf6eb66ae5327c96849920f879","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.67_1708356942722_0.07729616130036088","host":"s3://npm-registry-packages"}},"5.0.0-beta.68":{"name":"@akord/akord-js","version":"5.0.0-beta.68","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.68","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1f513ecc6aae2997be340be45a485d0a49fdb9ae","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.68.tgz","fileCount":129,"integrity":"sha512-rIuIHGYj5UdU0SDgX1EC9hmlIvc6+t2bbwDuVDevYvvSBCG0ctpIMjWH0yjqOMtbn8/CHiIGphTMMjaRN2ldTA==","signatures":[{"sig":"MEUCIQDdJjN8JejGVC/PGDPZaESs8wIWyAEEvB7I9VLsDVcS4AIgGWVrW79kGIFORKAah9LktKZdbxyonhGY5OhAVPil8qI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":393783},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c2ca6c69bea447bf6eb66ae5327c96849920f879","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.68_1708358937333_0.928514538956011","host":"s3://npm-registry-packages"}},"5.0.0-beta.69":{"name":"@akord/akord-js","version":"5.0.0-beta.69","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.69","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"79a19e625fb948f3b295838f4cc02b770c137cd2","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.69.tgz","fileCount":129,"integrity":"sha512-Tw2TChOeyqS8qupX+KigdfSNDEfNMdHuW9jdWvTz5LrHKNH5F3Ytkr28p2dR1bLyRdU0wKwzUKWpoT19PSp6LA==","signatures":[{"sig":"MEYCIQCagoUwlrX9KAPN2s4cPRAWYCSE3d0K4oSR6H5I9/m5xwIhALKGvz0rn89d+G+K/+VARtYW7jpfgVe3IDprrWheHHLF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":394014},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"ccdfd3cd41b8e6fd38ce22cde96529273365e4f6","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.69_1708436235319_0.3902869818648318","host":"s3://npm-registry-packages"}},"5.0.0-beta.70":{"name":"@akord/akord-js","version":"5.0.0-beta.70","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.70","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"47295ac0225143054d8af089fd1712f29b9cd179","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.70.tgz","fileCount":127,"integrity":"sha512-D/j+WWw3P2ykCjrQzWsqZkhKxti/IVlDBKmEFykGVapsUJHx68+RlPoBPb2npew4y/3mzZJuryXxrqOIasyZxg==","signatures":[{"sig":"MEUCIQCEjOQOX+9e0L5u1NZ1KSG4S9Ow7vh/EEiBLCu09MIibQIgDMvlRPfwOpRpYNeWnYcVkPBWsbhbaxmqfA1/m2bNx64=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389060},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"76d598c416b0d6acf7b78cb0ba3354e2754d0a07","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.70_1708519096670_0.27788441698755184","host":"s3://npm-registry-packages"}},"5.0.0-beta.71":{"name":"@akord/akord-js","version":"5.0.0-beta.71","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.71","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ae3f84a3a06b872a6b50217df74d833468ab2f0c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.71.tgz","fileCount":127,"integrity":"sha512-5Eqhsx5NntZoZ8NvdKTSXY4vUxDUjMl/1qk383LDf8jbW/aZMqsoYxgAXVPSUip77SV3EPl12DPZCpIR6pcpIA==","signatures":[{"sig":"MEQCIBXcsGQWVnqZdM0ZvMvbEFW6iY3XDOZ/H/TCg6UbpMlRAiBOUdhx+I4NLWvAIL8K/SR21A+6b4NmOYIyqUbIU3+KNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389060},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"d2bdf95c5698617881f64f17a4c5e19003038a8f","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.71_1708524458040_0.08406451836918105","host":"s3://npm-registry-packages"}},"5.0.0-beta.72":{"name":"@akord/akord-js","version":"5.0.0-beta.72","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-beta.72","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5993989ae7b4342a802f850a11a30c19b7ed7ca5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-beta.72.tgz","fileCount":127,"integrity":"sha512-VLdBvc9g+IDMyWvYt4lWfnFB/CSWoash3VMBoCtF+QI8CRMhU1qo4h75ClwB3/jDACBRKDqLc6NhqWTI9SKtGg==","signatures":[{"sig":"MEUCIG5i867WyyTNtHfcqA96ngdClkIgVMuN6JeYUs/tELNdAiEAgQbit5Ch+qcnhicFHS0ruB4xjfTR/UxJiVr5afJ2SAk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389094},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"69a0ac3bb08d0ecfee6c5cbbf914e5809229ed0a","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-beta.72_1708599646854_0.899465832038367","host":"s3://npm-registry-packages"}},"4.23.9":{"name":"@akord/akord-js","version":"4.23.9","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.23.9","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"88f0f7bf7b59d2717d3e5e1f8cd6bf565c77d75b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.23.9.tgz","fileCount":127,"integrity":"sha512-fkvZKVhxDMVXIIpq4T95OkFw4MYpRn135epwMlOxn9j5J2ZkoRHuOcqFrFYt9S6E+Rbmhu8MKZAQAkeYCJNRXw==","signatures":[{"sig":"MEQCIB/fZsqk8cfcjiYVVv067DBN6l8e07qSGMaoILH80ObKAiA5jVYe0pwgZZHkLLJBsHtCHRgn5a86xabu6D1yFLndEQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389073},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"43a236d60e57a7377e65bf14b5f51296fe89c6ea","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.23.9_1708615995960_0.8652033996592541","host":"s3://npm-registry-packages"}},"4.23.10":{"name":"@akord/akord-js","version":"4.23.10","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@4.23.10","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e21f0bb484254402b3bde23bc86f4ac850dbac43","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-4.23.10.tgz","fileCount":113,"integrity":"sha512-Sn5p82uedlauzIDzu03YwuIZ2jF7dw/vJtGfWVhbFKwYCngTkyT108lNaKDAG1jdy9rQNFM7Grm3nwZWQwY89Q==","signatures":[{"sig":"MEYCIQD1/6igWFePWb0RCrhWfpz0nFakyOeRW/Xlc8eV0D1m/QIhALwJtA2rPc/3hxvP1BTtyXo3q9BShePaqnuG1pHliJO7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":334933},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"f53391416d0c523c5951f1e9bc87b6a29286b791","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","streamsaver":"^2.0.6","@akord/crypto":"0.11.0","@akord/akord-auth":"0.29.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^27.4.0","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_4.23.10_1708616354206_0.97052054425639","host":"s3://npm-registry-packages"}},"5.0.0":{"name":"@akord/akord-js","version":"5.0.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"242340306e8093fecf8eb9df29838cbdd77e09ea","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0.tgz","fileCount":127,"integrity":"sha512-ETrSjSQBdluJzFGZFbrv/Dq+2xXEwsbV0aKwrRnOW4RS1894Yxz7UfSMc0m7VIeNvpThwXbYJTpKtKTHIbG47w==","signatures":[{"sig":"MEUCIQDyqBtIECVsQRBzD3h/onaXBHAny3FZ51+ljdcPzJ+IZQIgNvQnZZK0DjFeM4Dma5gjj+SgT1K3UruXOqc7GU2uUNE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389071},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"c02ea52d4e899d6fa8baad9ab80775ada0ac5b6a","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0_1708616638266_0.5764743276682915","host":"s3://npm-registry-packages"}},"5.0.1":{"name":"@akord/akord-js","version":"5.0.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1d90312a0403b460eafe92ea92120f352b5d64ef","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.1.tgz","fileCount":127,"integrity":"sha512-PKQ9wJgwd8EpvzITi/dVspD234+3sDh2P4zEJMjbpEzydYtoE3pXSl3O6hQflSGq0PRmmYCJ5TDmqTaYBrlf8g==","signatures":[{"sig":"MEYCIQDtdf0J7e8edgnSaODEytHacmUAYM+/eWHUU9GdJ7NrmwIhAKOiqfK8FQtRHviVgFKQjtXpNOhi4Yfn775Px0CtsmY6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":390285},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"af50cf266a95c2821b2e79c7cb9da840cd2ca80b","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.1_1709140334527_0.2288519639627089","host":"s3://npm-registry-packages"}},"5.1.0-beta.0":{"name":"@akord/akord-js","version":"5.1.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.1.0-beta.0","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"35e9a30448b8a17e48777d56b0f7e83843568b21","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.1.0-beta.0.tgz","fileCount":127,"integrity":"sha512-m/w1qjMgoRyKUGNljVIKqMb+LEgRR0DA2dn6IVskpo1NC00bgQS37asFPBBv8QGv+ZalwM46dMudLQ463qNDNA==","signatures":[{"sig":"MEQCID3VS98wcU7NimOIoRrPrdeaVgiM6ZSQ92tSAYre8ZyFAiBY+pqJzaEvY5MXdtJPErIW/JmgnQH5m91Jpx/nkrwKZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":390701},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"4982772df053f24c1f64e2c425835e2b4e057c42","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.1.0-beta.0_1709241747799_0.41082137163843524","host":"s3://npm-registry-packages"}},"5.0.2":{"name":"@akord/akord-js","version":"5.0.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.2","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"aae08876a700acf2e52fdcc74dca84856daf4d9e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.2.tgz","fileCount":127,"integrity":"sha512-ZQ2LtcPFsc54wPgbl0pAU/TfUfAYHsGMMfQ40cdDxx8M3alGnV3WgIe7W7B73iKL0KC0GCk0OVajLUS2SKVneQ==","signatures":[{"sig":"MEUCIAbBY2h6bCKDyfQ5O18H3jIyhnXa4nIT89iZtwzt08y8AiEA5hwXT1IhK/3uuENN+X6S1CKtSosbcFgjCPFK/s2Epz0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":390379},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"a46cb00e920d1214a49b47ce91747abe8fb1626d","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.2_1709722349733_0.8378573958803874","host":"s3://npm-registry-packages"}},"5.1.0-beta.1":{"name":"@akord/akord-js","version":"5.1.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.1.0-beta.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6a674daaf4d48bc68648472834cea32407c9c111","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.1.0-beta.1.tgz","fileCount":127,"integrity":"sha512-r/HZde0TVWff8N9RI9uYVG6gsmBDpG3Mpudlgm0h4D9a6I0qYNGWLj7ANhf4nosEugMmtMYclhM9NeffCjSMLA==","signatures":[{"sig":"MEQCIGZdZViPCiYoBbmnW1VQcAdNLyAEY8Vkn+HGhxJ7g8BcAiAYAQd5PYOfT48ZN4GHQFdWcUOFssrkr4RkEjuS3SzGKQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":387842},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5295b3796614c0ec498dd3475455367cc3b63813","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.1.0-beta.1_1709729482064_0.9681191310044615","host":"s3://npm-registry-packages"}},"5.0.3":{"name":"@akord/akord-js","version":"5.0.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.3","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"513a1963e530be7413d700a4a5ea082a76c5b92c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.3.tgz","fileCount":127,"integrity":"sha512-Zsd1Ly/RMzLSRzXMpStWvQPwJrEV7+I3NEmpn1jH1tvP1yKCDPUNd83qDpxquCtN5eRpiH/h/vls3fdPhNGP3w==","signatures":[{"sig":"MEYCIQC+SYb5KrsknmdnRhvfuZ088UKdVdq2B4/b00qvaX9c+QIhAPM6z/01B0bxKw9RwH9vVMu5lQL5kRZXsgDQo3CjngOj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":390379},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"99739cdff5e455c9f47b8101017d5f9d26b4d651","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.3_1709826573220_0.17740998611218428","host":"s3://npm-registry-packages"}},"5.0.0-alpha.2":{"name":"@akord/akord-js","version":"5.0.0-alpha.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.0.0-alpha.2","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"13c836cf1a98a69bc8009794ed9b4cc4074e2fbb","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.0.0-alpha.2.tgz","fileCount":163,"integrity":"sha512-MLDKfxeDhMLGU6Oca3Z8v3ZbaUAyiycSY5a0J1M49TntFxOCS3o0du4aUyI61bXbkiis7r9YbmRWHRzh8ErJsg==","signatures":[{"sig":"MEQCIFsPb5mD/f1xSCB9tdcFdr8Uk+eQ83sg6riUW48w9w2tAiBZbWYdjmXB9ZXDTBMbO+a42MPTtF3E1zeUuRvwNDEOIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":462439},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file, \"my first file stack\");\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://akord-js-tutorial.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", \"jam session vol. 1\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, name, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileLike`][file-like]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-like]: https://github.com/Akord-com/akord-js/blob/ab9bb814fa9cf73d9ed01052738c8b84a86040b2/src/types/file.ts#L8\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"f3e03a89e09ac68e93820afb5532859265ba287b","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.15.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.17.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","viem":"2.7.20","axios":"^1.6.2","lodash":"^4.17.21","moralis":"^2.23.1","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.3","@solana/web3.js":"^1.90.1","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1","@solana/wallet-adapter-base":"^0.9.23"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"^5.0.4","@types/bs58":"^4.0.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.0.0-alpha.2_1709896586273_0.2112027717231717","host":"s3://npm-registry-packages"}},"5.1.0-beta.2":{"name":"@akord/akord-js","version":"5.1.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.1.0-beta.2","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a3aa4542721b18b54af5baf83800d7a688c6f0fa","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.1.0-beta.2.tgz","fileCount":127,"integrity":"sha512-C8TKm2qry8NrEJ+3MV8WlA6+410UrApDEX0nRBqL7NZuO3y2zlycm5itqWu/l5LFbrC9wJRaASQ9d6WLZL6bYw==","signatures":[{"sig":"MEQCICNvH2JEeRgtEGdTB+4aGcaCvr4bhabmvtemUgGpBpQyAiBEUT5m8FVpEK3qnyhcKDOrQkHqK/+CqYzDNwou7fpSAQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":387947},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"b72363ea44a4be49b8c384059d6da82767d29945","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.1.0-beta.2_1711440859203_0.2063066951459922","host":"s3://npm-registry-packages"}},"5.1.0-beta.3":{"name":"@akord/akord-js","version":"5.1.0-beta.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.1.0-beta.3","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5c7d4ac882eb5905142cfbe49b92c58af2640aea","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.1.0-beta.3.tgz","fileCount":127,"integrity":"sha512-BFQq/ayCPwxX6dtXzXpU/70byGsfoqeZ2KWtHelGf5Swbbo1kSq55xoST23jF5LLDnGVOU1+fRf1EEwOdB7ppQ==","signatures":[{"sig":"MEUCIQCeDxgHSaQREmramf0sfVqaAyMQ3p3rlhQfZ2F2JsGk9QIgEUR4I8k8V1zwL3saN1bH9oj7M2LXmYNg3EMN51kN3Ro=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":388324},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be genarated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`FileUploadOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"path to your asset\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:StackCreateOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`StackCreateOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"xxxx\", // should be a valid Arweave address\n  owner: \"yyyy\", // should be a valid Arweave address\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  type: \"image\",\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL: https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"0a157623408383f7660344cbe234404f8a030445","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.1.0-beta.3_1711542771811_0.25091273613580256","host":"s3://npm-registry-packages"}},"5.1.0":{"name":"@akord/akord-js","version":"5.1.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.1.0","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5b09c81bc3547548173d4ae1d7c8b32cf7daf674","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.1.0.tgz","fileCount":127,"integrity":"sha512-r0SZnr4Fdfi7jl0+ePF860Fw3RfUZfmGk1M6uMV9ymKnT4vUv9obOcmGzQMMapX65WnpHXpw3GlJxvCNI0ajPw==","signatures":[{"sig":"MEUCIFwZ+jZGOdi0r2235BPd+3pD9TnQLnQNxH1/j86fyU8bAiEAwiYhTWIeYOJGR90r28GA9H/drqwHfV/GjqHQ7O5ySM8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389924},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"d0772aa52a2533cf0e099075b0f26a66726cfd6a","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.1.0_1711716251823_0.11660753403047575","host":"s3://npm-registry-packages"}},"5.1.1":{"name":"@akord/akord-js","version":"5.1.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.1.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b79da99df1495cc30d2912487cc582deecf717c1","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.1.1.tgz","fileCount":127,"integrity":"sha512-zaqObPr9qrQ5nd10fCbpeBTYiEFH5wxGgFlVAGDRyR6bhhELhysYRrbfBfOItEfTwXioSyPXwaHS3ziRjLp02A==","signatures":[{"sig":"MEUCIQDsHoHb22/Qqs6nERbhYRx4H7VIYDqWkUbQOPJaHCjfmQIgELjK4ikyv18aUIFTHusE4q9noyukO/TjVQ+z+Xegxnk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":390383},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"a7e0bff6415e47ad0ecf568af33235701e5ddca6","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.1.1_1712142923918_0.14054433131228805","host":"s3://npm-registry-packages"}},"5.2.0":{"name":"@akord/akord-js","version":"5.2.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"30ee1b8c59584dc4493549bbfea432c633a5e500","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0.tgz","fileCount":127,"integrity":"sha512-hHGELaI4wdObtIm78DJrsI0M+Epu8YxYW9co8QGecIT+Bx4v0MsD1kV2KERYOn6EKWLmvuXts32viWpV1DAp+g==","signatures":[{"sig":"MEUCIQDjtQYjE+ecW17kH51BaET9KHHLNYlZgGdaeAjzlyWMwwIgCZJsofd2VhPygrz8bbcOJVA8amTyWnYz1jqtcMlxc4g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":390696},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"1ee5e521d59c85a1f63074adddc24b7b92dd87e9","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0_1712745847859_0.6308069502410709","host":"s3://npm-registry-packages"}},"5.2.0-beta.1":{"name":"@akord/akord-js","version":"5.2.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-beta.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"cd2664d471b737e2663d0fb48f6ba85b109c174e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-beta.1.tgz","fileCount":127,"integrity":"sha512-WBZpdRhBbVq0zANBpK/flLZiMUqovvB3tfR1DByW72uMlCUW0qKPvPpEfi7aHZkI2v+JGHXXkzeuUOsabD4Puw==","signatures":[{"sig":"MEUCIFC60VKi6bBUbc561ffd10XzJQjCd96NVsWsPF+WqvjuAiEA6A/7/nkZsDNgOlwL9ZfPB1nJ2c+ihCXvrvCUP/rgmEo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":396374},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"4b73f892125119a9432c14de7a02f77d03732594","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-beta.1_1713190761955_0.5406069226018189","host":"s3://npm-registry-packages"}},"5.2.0-beta.2":{"name":"@akord/akord-js","version":"5.2.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-beta.2","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1020c839371b532c855e4f929ea4aceaf3622fcd","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-beta.2.tgz","fileCount":127,"integrity":"sha512-+Z8tJDmeMJLD50uAtyaucnypS+5ii20rPwUtwG1E1yPH+5xQxdIdkIiLEN7Cin3UwIsrSbbbOZUC8Kta1851uA==","signatures":[{"sig":"MEUCIArqHzMogqS1B/QIRRDSJtcZsBH/Ehy2KDhdxrGUM12QAiEA6vAD3qXHQfI5Vyb0LXtmbS23qKcyy8Jv/NqvQxT2XUE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":396523},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"4b73f892125119a9432c14de7a02f77d03732594","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-beta.2_1713197270104_0.1929874140564547","host":"s3://npm-registry-packages"}},"5.2.0-alpha.0":{"name":"@akord/akord-js","version":"5.2.0-alpha.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-alpha.0","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"6f929279f166de0b0c2aa532d7b9cbc35613581d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-alpha.0.tgz","fileCount":127,"integrity":"sha512-4huyk7URq1RI9EU2xSsx2LRZWvs7siGjWSTluQ6BpDXlpMyxS12rtLAYoCAGny1gEktLkR7ONoKb17FLAGAYFA==","signatures":[{"sig":"MEUCIBTtKSWGe+e3q5w1H7UTZLmhoE/L0u3AXh7xu52c0eTGAiEA18zpnmXpYIsaQUss9IBO97rE6v2QJmVC29FQGSGKAU0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":396215},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"442652adfbe5ae49608fbf1cb150d777d6deef9e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","arweave":"^1.14.4","arconnect":"^1.3.0","jwt-decode":"^3.1.2","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0-alpha.0","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-alpha.0_1713269441162_0.9742747952374395","host":"s3://npm-registry-packages"}},"5.2.0-alpha.1":{"name":"@akord/akord-js","version":"5.2.0-alpha.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-alpha.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"2bf361121460e06829f763ba4924eb04d8090102","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-alpha.1.tgz","fileCount":127,"integrity":"sha512-RZVkf4aR+4RvV7eBpMsyOymRv9EUUl3wPAu+XukoMr09Pej8BUxPJ0B9t2SWqFu4sV5k4225r10XXv+b+gKC8Q==","signatures":[{"sig":"MEYCIQCXSs7xvCOU1Nlz0r7LX3P9A3IuhQh8EWabCI+ZvGf01QIhAIM9qXIdFzK7BWPyad1q2u3u1sIMZ9OR5aQYc60CSlTu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":395970},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"442652adfbe5ae49608fbf1cb150d777d6deef9e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","arweave":"^1.14.4","arconnect":"^1.3.0","jwt-decode":"^3.1.2","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0-alpha.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-alpha.1_1713366153338_0.6095961716255305","host":"s3://npm-registry-packages"}},"5.3.0":{"name":"@akord/akord-js","version":"5.3.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.3.0","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1fa2986930ff2355b805afab022a8f14331ac6ef","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.3.0.tgz","fileCount":127,"integrity":"sha512-wzDYVzzq5zmqrJVn21oAsga0mPfX4zVZNV3pmsZr7uBUlMokMD8lgUIlKq4TzlCH6sR4SJY1UMmU1XqBjmGnfA==","signatures":[{"sig":"MEUCIBF4bY2czmEvU8NTJ5noylYX5tAwqmobvfgoTLQzdNlJAiEA1+6WsZB7FNzsRBFNEOAzhoRFZqpb6rRbxl8mCZNq1dE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":396086},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"fbe52d67e015ebbf08bd0887ff72f6c0dcfa10a1","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"akord-service","email":"dev@akord.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.3.0_1713533688223_0.6530932365219924","host":"s3://npm-registry-packages"}},"5.2.0-alpha.2":{"name":"@akord/akord-js","version":"5.2.0-alpha.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-alpha.2","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e82f2f1b8c353724863cf84eda4cc1576a717d71","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-alpha.2.tgz","fileCount":127,"integrity":"sha512-PukRGb0nkAfdEy5Q9QahKB2ub/Mkt3YqQR035VU07tpjIReWnmO+q6P5MB1BifJkhJ2MzvPxLcGNPdoI/lm8KQ==","signatures":[{"sig":"MEYCIQCB6AC5Bb3dNp0gOLb7nmzER6M/iHo8ZF4XwArRpJl/IQIhAMnMKnQzFRFnFriarLmGQx+/lsbUZqUgxxzUzFoKmMaJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":395779},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5041309b433c5e9a5ddf57e7f40eac8bc5c211b7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","arweave":"^1.14.4","arconnect":"1.0.3","jwt-decode":"^3.1.2","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0-alpha.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-alpha.2_1714121781138_0.0729293941381246","host":"s3://npm-registry-packages"}},"5.2.0-alpha.3":{"name":"@akord/akord-js","version":"5.2.0-alpha.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-alpha.3","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ad006c477355206816e917c511d6753c42507bc3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-alpha.3.tgz","fileCount":127,"integrity":"sha512-SSRtd622Sls+gfKzcEM1qKiiHQh+lV86wszDNBG/QSAuTnJ6YEHcgtTi59wkESjjRW1gtT0IhcM6sY8wsv7mrQ==","signatures":[{"sig":"MEQCIDDcBuuXzK0j8Q/VyLS3c20eiYEvftNQ2k+jcwN9b7wQAiAflmRqBXIoj9/DwA6Negm7u95CJJ+1nOg5/pHZhx7OPA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":395779},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5041309b433c5e9a5ddf57e7f40eac8bc5c211b7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","arweave":"^1.14.4","arconnect":"1.0.3","jwt-decode":"^3.1.2","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0-alpha.3","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-alpha.3_1714122425552_0.7757998710045746","host":"s3://npm-registry-packages"}},"5.4.0-beta.1":{"name":"@akord/akord-js","version":"5.4.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-beta.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"eb94e2b84af5a462ced9af3b79b8221e9cd3994e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-beta.1.tgz","fileCount":131,"integrity":"sha512-7YLaEda8KruIUvSr4mxYw94Jb0jnb1iV5kvVSTaQct8Xmm2mObA247Auy/RKR+AmnzOXk2d+57ohDz4L6NcKBQ==","signatures":[{"sig":"MEQCICbzoUusTb/FW7lKyeSmI+hYxMWv0Dl8RJCGaYV8ceNiAiBwfP/CuPQmhkxmSAmrRHGC96glHe0ZXJjekgEqwZrsJA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":403875},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"fd8aa96c7bee8dfa7313984788d9bf5e1b6825d6","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-beta.1_1714477093546_0.9255909245086202","host":"s3://npm-registry-packages"}},"5.4.0-beta.2":{"name":"@akord/akord-js","version":"5.4.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-beta.2","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5e149bbe9dc41a252ec174cd3992b68551233a84","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-beta.2.tgz","fileCount":131,"integrity":"sha512-UN6FbH8oqcvET+NRn5qS2f6Nh8ejQmSozcrB2ChgdbkKPG60ScZpaVnYtNpnkd71eXXTEdz464QEDeUcGZfEaQ==","signatures":[{"sig":"MEYCIQCeNlY7ozce6bZnOFFAHijiVDO/MnST5RcVpAMrctPZvAIhAKoU8VR+gjfpqxBvra/z2gfa246sEzUTAx/7DHC5Avvd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":403892},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"a6573210ddcad2c153c405543bed720b48e6a379","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"kgracki","email":"kacpergracki@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.5.1","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"21.7.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-beta.2_1714490026470_0.30059455812210656","host":"s3://npm-registry-packages"}},"5.2.0-alpha.4":{"name":"@akord/akord-js","version":"5.2.0-alpha.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-alpha.4","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e8ea081b13ff090f84ebc3a19cfca612d2e670a0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-alpha.4.tgz","fileCount":127,"integrity":"sha512-T6w8uhoRFkbyWGZIK3l86zo4HGjdMor23CEfvDQcWrlUH12Ahowp+Lo22xQQJHTfj2TYoGIq2s6iDv9TrGLp1A==","signatures":[{"sig":"MEQCIEOpwGMD3Y+8QejuK0zn7rGsmoZGZirH19l5l8/ahwIdAiBiep+FEFZvLqWPIpdiJr3YE2Gr3sQ8WWrAU3Rg0TzbaQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":395779},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5041309b433c5e9a5ddf57e7f40eac8bc5c211b7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","arweave":"^1.14.4","arconnect":"1.0.3","jwt-decode":"^3.1.2","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0-alpha.4","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-alpha.4_1714738746346_0.2779668750452482","host":"s3://npm-registry-packages"}},"5.2.0-alpha.5":{"name":"@akord/akord-js","version":"5.2.0-alpha.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-alpha.5","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"2d49a6714b906139f109888108442a91cda8db0f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-alpha.5.tgz","fileCount":127,"integrity":"sha512-PR3iSnHvPImCeV8D4QTnxabfRtDjqBdL6DPdg1mPQFnW017pIIIRwCrrN2pzfYL5mdyg2fOABOxrbe/7jxukbQ==","signatures":[{"sig":"MEYCIQD+0TKZIwVGg1fHFnAAhChD40vF5KSiE0FnA7gRQis5HAIhAO9kNAnUXRJHPKTYZA6SmQwz5O4hMmZk4+rXy+y3JGCy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":395779},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5041309b433c5e9a5ddf57e7f40eac8bc5c211b7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","arweave":"^1.14.4","arconnect":"1.0.3","jwt-decode":"^3.1.2","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0-alpha.5","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-alpha.5_1714915291390_0.8091586303056206","host":"s3://npm-registry-packages"}},"5.2.0-alpha.6":{"name":"@akord/akord-js","version":"5.2.0-alpha.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-alpha.6","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d9bdad06e2740c58f43536db8f06e5299577e48e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-alpha.6.tgz","fileCount":127,"integrity":"sha512-Ikgp7wsCDRg1I0Z+QC9eBZzj6NEn/9KOnD0BNa4K0+uG6+2WjJ03nCR1c7g4Z9HDiXhVstcOQNLS9R9YPjQvSg==","signatures":[{"sig":"MEUCIQC5B1AFLcXzzbom9+qJDVOrUdPJZHCoeOjPaJ4gq5fFeQIget/HzvmIuDttDfpld4xAmQvRZpyha2ZDSsQWN/Ate9g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":395779},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5041309b433c5e9a5ddf57e7f40eac8bc5c211b7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","arweave":"^1.14.4","arconnect":"1.0.3","jwt-decode":"^3.1.2","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0-alpha.6","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-alpha.6_1714916005854_0.5667360083926398","host":"s3://npm-registry-packages"}},"5.2.0-alpha.7":{"name":"@akord/akord-js","version":"5.2.0-alpha.7","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-alpha.7","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"08dfcb850bd2fb23964c169dcb5609624f151b55","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-alpha.7.tgz","fileCount":127,"integrity":"sha512-RjeFFS1SX3buLx7ElLtS0rjmAK2gLiKVbUogRp2O7ugxZDofYsPTRbLId2zAzw/d80cOR10OPiLYA6teys5CFw==","signatures":[{"sig":"MEUCIGt/QVrN3XG+j6NVEMY9dbJLwks44HeCqeU2e2l3i8bZAiEAqayKt0gpZFk+rVd5nKWbnOeOMl4x1MyfFbcFq2wmDag=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":395779},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5041309b433c5e9a5ddf57e7f40eac8bc5c211b7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","arweave":"^1.14.4","arconnect":"1.0.3","jwt-decode":"^3.1.2","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0-alpha.7","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-alpha.7_1714929756317_0.19164733127082534","host":"s3://npm-registry-packages"}},"5.2.0-alpha.8":{"name":"@akord/akord-js","version":"5.2.0-alpha.8","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-alpha.8","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1854593b4b292bd34f9b8db77ae87d5fa6e9fa4b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-alpha.8.tgz","fileCount":127,"integrity":"sha512-BCASnqNWObpxgRnFZgOtGHncxtV9+4r1Au9byA+uuhdCKfc8fmIC1fnhD0o9HpBEYWk40UxiUMZRez8KrXhMMg==","signatures":[{"sig":"MEYCIQC3JtPcKbR+QMHwnCrtk+6PDaxX1q62/9/w+SaPYcY+zgIhAOUDGu/zyinVc8mdl8w0tM92cPnXUnrwxVZ7NpW5iGCh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":395779},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5041309b433c5e9a5ddf57e7f40eac8bc5c211b7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","arweave":"^1.14.4","arconnect":"1.0.3","jwt-decode":"^3.1.2","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0-alpha.8","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-alpha.8_1714931220666_0.5766608499534598","host":"s3://npm-registry-packages"}},"5.2.0-alpha.9":{"name":"@akord/akord-js","version":"5.2.0-alpha.9","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-alpha.9","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ee4c4de9fca8596dda607b1072b71641dc1454b7","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-alpha.9.tgz","fileCount":127,"integrity":"sha512-YkBaqwgwzWGFXYTPBMoxylbz9/+1kCovnzmI6gfm6/nqMXA65OU2HUOgJarmz2nqmL2niGyG2JM3ibxUsPTYqg==","signatures":[{"sig":"MEQCIAQH1xcA9FyjpsQTyMLoV7Q5UsbDlHxZaFS+1G71uAJ2AiB3BkDBnioLjkN1JhWuKWA3uAa3wV0wACK2sftoqmSxLw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":395779},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5041309b433c5e9a5ddf57e7f40eac8bc5c211b7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","arweave":"^1.14.4","arconnect":"1.0.3","jwt-decode":"^3.1.2","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0-alpha.9","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-alpha.9_1714932234400_0.387703679415796","host":"s3://npm-registry-packages"}},"5.2.0-alpha.10":{"name":"@akord/akord-js","version":"5.2.0-alpha.10","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-alpha.10","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9dff818cfd4a5273ee93298e16a908f326d2634b","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-alpha.10.tgz","fileCount":127,"integrity":"sha512-Jr2ynVat3adYQhXbwvgBK5dKm68Qbd5oRrBELBaNXxhnBiTVMeT2FOvUWmtDYsGP9w71ByxujD7nQvRBsQPzdw==","signatures":[{"sig":"MEUCIB05ct7Wx9oZYuyWynvZZUB9NjHSAQUBoUrfhC4iYjHoAiEAoN+dZ+ZV36EPiTXbmZIsVqix0UnolgcWxaFev11wRvg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":395781},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5041309b433c5e9a5ddf57e7f40eac8bc5c211b7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","arweave":"^1.14.4","arconnect":"1.0.3","jwt-decode":"^3.1.2","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0-alpha.10","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-alpha.10_1714932574500_0.10181797685915939","host":"s3://npm-registry-packages"}},"5.2.0-alpha.11":{"name":"@akord/akord-js","version":"5.2.0-alpha.11","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.2.0-alpha.11","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1a5f207f2aed94dc0d8b4eaa50d9f6c38b5dfde9","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.2.0-alpha.11.tgz","fileCount":127,"integrity":"sha512-B+7Gk9/o0o5V3JJ/5PAlRLnRc+JdG0ECGcHgGTw49jiV6ZoARGC6L4mkcRWsIRBw5kbf+lg6q8I32BBjyhKFvQ==","signatures":[{"sig":"MEUCICW41n4zSJbwWxpJspx6bZmDLhuF5IJQ3TUlMe9DRVslAiEA2wUtV+TXZ//q4eLw12mWf+mV4I2P1jtxw/WJa5tKvvI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":395781},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"5041309b433c5e9a5ddf57e7f40eac8bc5c211b7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","arweave":"^1.14.4","arconnect":"1.0.3","jwt-decode":"^3.1.2","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0-alpha.11","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.2.0-alpha.11_1714935838566_0.14997360448422659","host":"s3://npm-registry-packages"}},"5.4.0-beta.3":{"name":"@akord/akord-js","version":"5.4.0-beta.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-beta.3","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"10f697352f021ed4d1c8cca3bea8b20bb5526424","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-beta.3.tgz","fileCount":131,"integrity":"sha512-ws0tPmBGrwodaOR7t8Q9DsQojMiZHEv7R7Nf1qQ0YgMZjjQT6rgUIG0sHHOJ/o5UWPOuANz1pf+/Arp4PypD/A==","signatures":[{"sig":"MEUCIQD3fePeLLkkKxISFCwPhsky1GQNyjzNTa1a3LMmpDmtYQIgURvA06batPg45hNuZ4N6LxWx7oHf9RlIJGJLwzOT1YE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":407918},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"a6573210ddcad2c153c405543bed720b48e6a379","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-beta.3_1714982689296_0.9015823014830324","host":"s3://npm-registry-packages"}},"5.4.0-beta.4":{"name":"@akord/akord-js","version":"5.4.0-beta.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-beta.4","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"62e2d237de45f9053094113b18d7c41ecf02acf5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-beta.4.tgz","fileCount":131,"integrity":"sha512-bxr4aY8KN2OWgHN9mMXOTzryF9A7qHQP3jIkNGNWjKdKtVgXIQfPcBBlt+zQGzej8X4dedzmMjDYBq27V0c/mA==","signatures":[{"sig":"MEUCIQDbTLXUDsR5Tnl5U4xW59vyMJvSM0pXpMAQvGeWx+zNIAIgKMtLWudj+Cr3RS42eXA74UYYlWkr5RqFfBNXmKflrM0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":412563},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"214394a070f2b24117f7ce290f9d7ec16be0d5bd","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.12.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.29.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-beta.4_1715065028830_0.8654433123692893","host":"s3://npm-registry-packages"}},"5.4.0-beta.5":{"name":"@akord/akord-js","version":"5.4.0-beta.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-beta.5","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"21f1fa5ec8b456639d45b357e7b42fa2fde1d00d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-beta.5.tgz","fileCount":135,"integrity":"sha512-MO3UebeadER2cVDSzIN7oDbUMHDAXg9Q3s9660xHwo1Z+ig3xz+4QaA8w/Cqs5MtPCOg5CEZjD/Ezwkii/Qpbw==","signatures":[{"sig":"MEYCIQD/72gcUI6L8cKOs2Vqk+x7P8O0fcIYhoR+9FmpLLKLdgIhAK/9169lvfWutWET3y9HBP3cwMDcDyK/PEMKwe6p6AsF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":418019},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"cf207f1c058239a4cb9b57054c0cc5c8efb9043c","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.12.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-beta.5_1715326195253_0.8685547600693706","host":"s3://npm-registry-packages"}},"5.4.0-beta.6":{"name":"@akord/akord-js","version":"5.4.0-beta.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-beta.6","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1df38e80d382cf5a55de51099ebdefa5537d52ab","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-beta.6.tgz","fileCount":135,"integrity":"sha512-LXVPmT8soLuYEiVEDaZgeXOOOuRXcormtBC9S8cs8DAUINtH2pSxoeXb2mzj88N6e2yvGU9TRQszu1KWOyLopg==","signatures":[{"sig":"MEUCIEg6MPBrZK6Tqdih7dZGo55G1GgPQBG9JVn74dsVMaQ4AiEAkJA70akjAYcEsnWaYLU4gmGnYahlxQJxAwxEDUkVO2E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":417968},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"cf207f1c058239a4cb9b57054c0cc5c8efb9043c","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-beta.6_1715343507154_0.1655229869585646","host":"s3://npm-registry-packages"}},"5.4.0-alpha.0":{"name":"@akord/akord-js","version":"5.4.0-alpha.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alpha.0","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"40f86ef2c60ba1f53f2d4709a2c6c176c6ffaadd","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alpha.0.tgz","fileCount":135,"integrity":"sha512-zlAq8J5M8hahgvrN/Ao8p8bQgWpp8AopgysDyf/h9iedgepg+ScTbJfrq3OxMGDyfjt0suUHeGfu9GlodZd1nw==","signatures":[{"sig":"MEUCIQDBQGlye3P5CBd3mkQWKC6RPjxBJzg9mgwHrB3i2PFmJgIgCfixeC7TD4RbTljH1FUbv6jvkarCESgXyay6DOemZUE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":417058},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c83df9b5753a725ec594adf5338fa54f73b4950e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alpha.0_1715849788132_0.2832433015984055","host":"s3://npm-registry-packages"}},"5.4.0-alpha.1":{"name":"@akord/akord-js","version":"5.4.0-alpha.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alpha.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"124228b9f3baeaeda6baf9d77bbd17f38236758a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alpha.1.tgz","fileCount":137,"integrity":"sha512-zukh0RHhsO18b5y5Y+Gp7Nt1zkOnhLYqkJ3ng0XllBkNmTa8OqVRxzV0uBQzjr4Pg6toWFiz5oby/TQ0+PyLDg==","signatures":[{"sig":"MEUCIQD19lSjmBpaMVmIvmwICoIQA9kF80y7ZjgQ+2MczLCeRgIgXv0aMpoK8EZXwOBIjZLocnEckRsvw6lDrbjlh5xNPNo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":415400},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c83df9b5753a725ec594adf5338fa54f73b4950e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.1","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alpha.1_1715853170155_0.21965310871198618","host":"s3://npm-registry-packages"}},"5.4.0-alfa.2":{"name":"@akord/akord-js","version":"5.4.0-alfa.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alfa.2","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"ffbef7eb843e8338cd56995bff92c62ad30ca5a2","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alfa.2.tgz","fileCount":138,"integrity":"sha512-mEnDYkFD4UF2XPrxfzMJ7Rt+4lUQ9ieIyoan5JAEUnMgP/x58RK4ikmAONKgcVyGqIchjIWAGBankM9pvQSyRw==","signatures":[{"sig":"MEUCIQCWIW85pjNGbdXYnL9V3dEjf9H4shzIyJ1fpVP5yNg0BgIgF1BGZnOdRKD78euQ5ayhzlDSyJ5T1/i9EjI4DPnXDbk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2165421},"main":"lib/bundle","types":"lib/index","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","browser":{"path":false,"./src/types/file.ts":"./src/types/web/file.ts"},"engines":{"node":">=16.0.0"},"gitHead":"68488dbf3305820dc01ff59abbf0933e0a9f1e5b","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","bundle":"webpack","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.2","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","webpack":"^5.91.0","ts-loader":"^9.4.4","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","webpack-cli":"^5.1.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alfa.2_1715855748711_0.5003186847470338","host":"s3://npm-registry-packages"}},"5.4.0-alfa.3":{"name":"@akord/akord-js","version":"5.4.0-alfa.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alfa.3","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d4b94a76a33efea5ddb4e0445f2801680837f58d","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alfa.3.tgz","fileCount":71,"integrity":"sha512-0HNDqOzymrcY3ESOy4AQEMGcATu0hHiuLMjS5xgYbu0eqbM+/756bMvMfnQR2tOuPmHuIgiYmWsny2tlGKcCNw==","signatures":[{"sig":"MEUCIG7OEgI3qqJL2WPk0btSoxCGywp7SOMsAobYPLgsZiPtAiEA+CgpLJxW/fRK3uAuWyYB/7j7B0gbh2PWAYqt5/HYG5k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1880146},"main":"lib/bundle","types":"lib/index","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","browser":{"path":false,"./src/types/file.ts":"./src/types/web/file.ts"},"engines":{"node":">=16.0.0"},"gitHead":"68488dbf3305820dc01ff59abbf0933e0a9f1e5b","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","bundle":"webpack","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.2","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","webpack":"^5.91.0","ts-loader":"^9.4.4","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","webpack-cli":"^5.1.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alfa.3_1715855882535_0.84747292162871","host":"s3://npm-registry-packages"}},"5.4.0-alpha.2":{"name":"@akord/akord-js","version":"5.4.0-alpha.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alpha.2","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"2a72238a2e60f89416667596834b54a110d44562","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alpha.2.tgz","fileCount":137,"integrity":"sha512-zF54YMgIQQXj1R6ltnU9ongzMoJyBG6dxYQZKbemDxMSY9cNegILlqFx/eqtr+x9vDg4APgGbiRBB1KGYi5o0g==","signatures":[{"sig":"MEUCIQDj8MYd9NvnetG87tSxKR8h2zOsjziMnNNntdKH95xqrwIgZ0bd3z+b5mZ3FwBYSLJ6f0FFAl+JEiN+RyuWn2Z4JiE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":415227},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c83df9b5753a725ec594adf5338fa54f73b4950e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.0-beta.0","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.2-beta.0","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alpha.2_1715861986782_0.5312341714616842","host":"s3://npm-registry-packages"}},"5.4.0-alpha.3":{"name":"@akord/akord-js","version":"5.4.0-alpha.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alpha.3","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d157bc8366f37f278baf23dd56db17650c69962c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alpha.3.tgz","fileCount":137,"integrity":"sha512-H++e5FUwW5NTqg+T2F/Fg7keMjwefmyK3TWiSkT/4tBTjIhEF4vca673rOknziLPSnBnqtuE1OXShbR7pM5NQA==","signatures":[{"sig":"MEQCIFlcukOXYITGJcXHIL4bKDiqnvd2YzIDbp3/w6ym7GgVAiA3JGxy+jW7gQKl5rq5EKePyP4OxQ+iN1rI1nvT6swDTw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":415213},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c83df9b5753a725ec594adf5338fa54f73b4950e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.2","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.2","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alpha.3_1715866521801_0.916662710730547","host":"s3://npm-registry-packages"}},"5.4.0-alpha.4":{"name":"@akord/akord-js","version":"5.4.0-alpha.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alpha.4","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1cf18b5f83f02f7adb67f19989d7bb19ddfdc5e3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alpha.4.tgz","fileCount":137,"integrity":"sha512-Yh53VsBbgQ7Cp+co17kITwZTWQWOIQHwaX4rTzSZ3PlwPh6izYlycanj3ESKLBmmg77aD8k7XoXNWmBHxNqiZQ==","signatures":[{"sig":"MEYCIQCoyqDCzKsXX2cQNMnwAb8bpCLzFSrdk/QlDfKp/8G2BAIhAPE1gq6U6+wU0S62SLCQalJ+th2MRqy5N90P5fIOL5lK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":415213},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c83df9b5753a725ec594adf5338fa54f73b4950e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.3","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.3","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alpha.4_1715867398750_0.5396880305430962","host":"s3://npm-registry-packages"}},"5.4.0-alpha.5":{"name":"@akord/akord-js","version":"5.4.0-alpha.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alpha.5","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"207a0bcd4e132d5dbf276c8be9d3b57e4d9ca5d8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alpha.5.tgz","fileCount":137,"integrity":"sha512-8NcRFR6y95kL5wZQ9NllHvZ6Fu6tQep9JrwifkxS9AAFeR6JriUvtxClTzvM9ix97CNS+GcBKXN+X9i956xqMg==","signatures":[{"sig":"MEUCIQDmJ8jIJSKnu/4ps4gB6zkH9UYe/LnGP1fiMAXmlYlK8gIgWl7aJRRhtlv5TtUIVLEAL4XyYKKSTwfUxHvArUaEOsM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":415213},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c83df9b5753a725ec594adf5338fa54f73b4950e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.5","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.4","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alpha.5_1715868797255_0.14148254239172298","host":"s3://npm-registry-packages"}},"5.4.0-alpha.6":{"name":"@akord/akord-js","version":"5.4.0-alpha.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alpha.6","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"34e2f2c8563265cda632c582de65b9c9b5822b2a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alpha.6.tgz","fileCount":137,"integrity":"sha512-rHj2XulRz+I31qryZD19syYxZ4uNYyyd7cp+du0GipQgG3ZT9Yvpw0oDJgWaNZ7A3ni7ZPzwjZMvSK7aDnSTHw==","signatures":[{"sig":"MEUCIQDuOOl4w/vVIaUlqd+LTZbPgkL9lr/GqT6MOLsw8qJBKAIgFXtcy0J0KdhNEKF8i3OjTP4Zjp9h/qLMprKRXuFjrOU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":415213},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c83df9b5753a725ec594adf5338fa54f73b4950e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.6","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.5","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alpha.6_1715870735761_0.18521045602400443","host":"s3://npm-registry-packages"}},"5.4.0-alpha.7":{"name":"@akord/akord-js","version":"5.4.0-alpha.7","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alpha.7","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"22febc66453a96e8237660133390f54aa7187b76","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alpha.7.tgz","fileCount":137,"integrity":"sha512-zediojEG3mPXlxzjw4GaDgQyDEusc04HgP3i4HvtemrokutWXlRTVTkpHBhOaQ/vUXoS4fOC8e3TTEi8mdnx8g==","signatures":[{"sig":"MEUCIAgqFxwqpw0TJwnvb6WaljIMHjZ2eho8LvBYIah0HqvYAiEA81saj6cu3DqFcuas+4xXu7NRek1Dt5XKaR8OzuGhcJE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":415213},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c83df9b5753a725ec594adf5338fa54f73b4950e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.7","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.6","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alpha.7_1715872137983_0.44153350289324345","host":"s3://npm-registry-packages"}},"5.4.0-alpha.8":{"name":"@akord/akord-js","version":"5.4.0-alpha.8","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alpha.8","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f0055510b19e677a997f69e78a825463115542a0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alpha.8.tgz","fileCount":137,"integrity":"sha512-BFHVHM2zX7kUmGmdF6A3keIGIBZDgRQBkBz0RI1FQHHCsSzaJTgf7XaPes11Iz9E5jw1RKOesxF9hwn358DxfA==","signatures":[{"sig":"MEUCIQC7nOM/aeMpVxa8rDChuWM52hqTuyBNHzJjDmBf48xdXwIgaYS/9kwKHSOAV64DGPEi4OcrBDi5M7FlyEPnQADplJE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":415058},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c83df9b5753a725ec594adf5338fa54f73b4950e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.8","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.7","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alpha.8_1715873952992_0.39656573797749317","host":"s3://npm-registry-packages"}},"5.4.0-alpha.9":{"name":"@akord/akord-js","version":"5.4.0-alpha.9","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alpha.9","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f36f2531470d0fe3ba3d3053e599623dbe857913","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alpha.9.tgz","fileCount":137,"integrity":"sha512-U+mrwSV9cClof+YUmx+TnBsg53PxJjnpWufguP3HE/0DQV1EUadsf1nzPBbCPm2+gEGXwgYVp0c1iOj+Jg4bDA==","signatures":[{"sig":"MEYCIQDXXWA0qkowSth8ux56nBjdwmCvRH/PKTYs/GRe5/Y0twIhAPubvQDw7E9XQoaEAg2dQDmYfBlGoVGv/zy+IMwxAFoy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":415083},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c83df9b5753a725ec594adf5338fa54f73b4950e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.8","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.7","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alpha.9_1715876206269_0.9723604511717574","host":"s3://npm-registry-packages"}},"5.4.0-alpha.10":{"name":"@akord/akord-js","version":"5.4.0-alpha.10","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alpha.10","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"akord-service","email":"dev@akord.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a513184003a657d5a7ec16baea21e54f53a11e68","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alpha.10.tgz","fileCount":137,"integrity":"sha512-ZZFhl1aDkyCJVroSB1xMScdDYEmmB+4uCRhbAmOTJDd9VoJBUMkx+lVDibOyq3p9jaVvSqJGvBzdxNrnA2r0ng==","signatures":[{"sig":"MEUCIQCCkst+RDXSYMzX48kHmP3QH2+j6gfIfPdNSgOaX16mEwIgKdyipb5djWgk3oupN4/XWygHFpujF7B6o8rYjuOMovo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":415148},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\n\nawait akord.membership.airdrop(vaultId, [\n   { publicSigningKey: wallet1.signingPublicKey(), publicKey: wallet1.publicKey(), role: \"VIEWER\" },\n   { publicSigningKey: wallet2.signingPublicKey(), publicKey: wallet2.publicKey(), role: \"CONTRIBUTOR\" }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"c83df9b5753a725ec594adf5338fa54f73b4950e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.8","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.7","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alpha.10_1715876675886_0.9112782416814122","host":"s3://npm-registry-packages"}},"5.4.1-beta.1":{"name":"@akord/akord-js","version":"5.4.1-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.1-beta.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"cf99319e52c835a9435f49d7d8d5b145fcc78fa0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.1-beta.1.tgz","fileCount":137,"integrity":"sha512-ANsKbRH0ad9tRHmCIHl1U7Pi1hXHXp/jvegTvqJAh6AZDyPXLxYX+8YjHRmy0Y5E/v/urplbe/eBfWZQ0mhk9g==","signatures":[{"sig":"MEUCIFikbc3TpwXA79hpLDd9IIIapPmeEYyCTlWS2ZPJCONlAiEAxOlfEhkXwRGRgfrBdsfm+qju3/aSJX5O2rdDvTDkPzc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":416510},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    expirationDate: tomorrowSameHour // access valid for 24 hours\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    expirationDate: inOneMinute, // access valid for 1 minute\n    allowedStorage: 10 // can use up to 10Mb from host account\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    expirationDate: null, // valid until manual revoke\n    allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    allowedStorage: null // can upload using full storage balance of the host\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"68df1054b1def3c1ade5b52aaf8045dda2ec667b","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.13","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.11","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.1-beta.1_1715928785871_0.7794409298964036","host":"s3://npm-registry-packages"}},"5.4.1-alpha.1":{"name":"@akord/akord-js","version":"5.4.1-alpha.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.1-alpha.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"692da646c852983cf3c63f7f271d6c6083cc5227","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.1-alpha.1.tgz","fileCount":135,"integrity":"sha512-GmO0dkGM2cqLNo0qqcSOrpYmI+2eLlgvy0Pr83+bQl7+u3EGVYmZSmNmXx26jgWGGPVfYmqqZDpY7NWSJEk3Kw==","signatures":[{"sig":"MEYCIQC8Nk1pOEnwHau62ivFk59nzyAdvJsfqNHcb9IBax96hAIhAIoOFVLszHJfNeV75aiLHuIduEHnxBWIb0km/yup7qAq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":419383},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    expirationDate: tomorrowSameHour // access valid for 24 hours\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    expirationDate: inOneMinute, // access valid for 1 minute\n    allowedStorage: 10 // can use up to 10Mb from host account\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    expirationDate: null, // valid until manual revoke\n    allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    allowedStorage: null // can upload using full storage balance of the host\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"a1f76d3bf99f8993ed8dffdc81642dd8392a681a","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"^1.6.2","lodash":"^4.17.21","mime-types":"^2.1.35","cross-fetch":"^4.0.0","@akord/crypto":"0.20.4","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/mime-types":"^2.1.1","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.1-alpha.1_1715930565137_0.11138134998938365","host":"s3://npm-registry-packages"}},"5.4.1-beta.2":{"name":"@akord/akord-js","version":"5.4.1-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.1-beta.2","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d7e567409795b060612f22ef70b187f29bc5c0b1","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.1-beta.2.tgz","fileCount":145,"integrity":"sha512-c6MY1XdT7T/wqW8+yZb2nYKIdxs3bA1UxVwg01/rkFKQy+n8PxR2F24nG57EIU1UOR4V54lgo/izqyZ8yGoOfg==","signatures":[{"sig":"MEQCIAnjD4G9v8j2J58DFIe7O6GJZ7vjWoCyp8BCmwrtHfoOAiAFDrDO/EkrmCGpPswYKgJBN3XWPdKLI+PGlNjemDeHNQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":438441},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"a81f65cb826528bdbe33b9ebef21c6e66df0de01","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.43","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.29","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.1-beta.2_1716400473689_0.6955734274303476","host":"s3://npm-registry-packages"}},"5.4.1-beta.3":{"name":"@akord/akord-js","version":"5.4.1-beta.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.1-beta.3","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"58699eec5cc28c037b27eb7cde2d4ede945e5aa8","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.1-beta.3.tgz","fileCount":145,"integrity":"sha512-VBfrRGjdGKgoOFuqsk17X4XOYu1al6J14D7mogvYB/VLzjL41ygsE0GMaaXz4RJSX5WNebXatpXCIq/Oy1dekQ==","signatures":[{"sig":"MEQCICS8RsC4G5yiOJO++tuaBDtG9oBlIhYQFnsCn2AVX5vnAiA8eee1wgKP/QWVbaUC2LOmOuhGDiKHBWwpuZVY04muQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":438446},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = await Akord.init(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows in our [tests repo](src/__tests__).\n\n- See different setups on [recipes repo](https://github.com/Akord-com/recipes).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"1084bb49e551cec0fa1d1849c0367d3dbe030bd1","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.18.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.43","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.29","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.1-beta.3_1716455119728_0.23838701372603888","host":"s3://npm-registry-packages"}},"5.4.1":{"name":"@akord/akord-js","version":"5.4.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"5b50a09bdd48980e85822f0ed0f9f87eccd6ad93","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.1.tgz","fileCount":145,"integrity":"sha512-RAeGRpU12GfgWkf5KeOm/TuVEVjmGXYeZUboY4W+2W9MJthUI9BeuQ8ObkjuDKHeAPJR1wYU2O0jZHDjYmTDZA==","signatures":[{"sig":"MEUCIDSWOunPdIiurad5uQlwQCZkiUeZm1GJb5/mgQnIxpeeAiEArOvuXGoVzo0tzcfrh2mfE5uuRxJksN7UwlH4fJYbD1M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":438963},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"5f1b22f64fa9c2b987e61e2b0b8429d80fdd521e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.49","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.34","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.1_1716467326633_0.6674089282895377","host":"s3://npm-registry-packages"}},"5.4.2":{"name":"@akord/akord-js","version":"5.4.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.2","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"996fdf40f83a2247f1a350e11e6073c9997dc230","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.2.tgz","fileCount":145,"integrity":"sha512-E6ysFY69Cvxf7TzLu4BOBMFQI1t31g/8yIYM9HKwsVxTiWKkSYmriesS5buAxJuOzFMLO8fsWJouuJB3JqfyQw==","signatures":[{"sig":"MEUCIGL8vNeiOQTI7fo6lsO6l2Oa4o3tR/XhPmdefDKWquUUAiEA/Csq7Goul4qa8mQfdFoR1Ljgw1MYxX2NRo7IMGIlx+o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":438963},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"97bb257c9fbd187f46173360b1dff2d918c7117d","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.54","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.39","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.2_1716478235925_0.9291199690832666","host":"s3://npm-registry-packages"}},"5.5.0":{"name":"@akord/akord-js","version":"5.5.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.5.0","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"804e59c4349d1a8f8eff32f6153afafb20f087bc","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.5.0.tgz","fileCount":145,"integrity":"sha512-E5dtx9gK2obCdzD8f/YRfznk7fn5N512CNUuoIFB19+UwHVhdcsumqDSkoNAUHr7JkSaaMtBIS11RFCbe7+9TA==","signatures":[{"sig":"MEUCIDaC887PzFjxKUf+czqnJlpSyW+mveEkzEEHWufk4AGgAiEAkyWUTwveETsp59qm3dXH2MmCHhaXyptclJUbodvQSmA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":438963},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"b2201d019ec02a0a3c7833fc06bfc1702236e2b5","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.54","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.39","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.5.0_1716550565766_0.43060011113250307","host":"s3://npm-registry-packages"}},"5.6.0":{"name":"@akord/akord-js","version":"5.6.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.6.0","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"df4945f7cf94f323c94a88dc4521170a7b49e2f6","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.6.0.tgz","fileCount":145,"integrity":"sha512-3JGltjdNDqex+DUeuORopPnIN9Of5n7Ti2/XARLJM5vnzMIxVcCqYHB4yXJNJihS9md/s2u557yR7GAYuv9tnw==","signatures":[{"sig":"MEUCIFsz5QAyoNvubddWn+SMd9irL05/qhEcxwKmIqSntXflAiEA2TWKQADC4+5zOhnx80/aXXvDMbxLEC8I+yODH2hzLfM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":439331},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"bbd82a25e967af925f7b4f8c8d9016fb87f99c57","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.54","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.39","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.6.0_1716555288128_0.5542510016457709","host":"s3://npm-registry-packages"}},"5.6.1":{"name":"@akord/akord-js","version":"5.6.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.6.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"3183bd363906c9e6b500318996eb1531efc33175","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.6.1.tgz","fileCount":145,"integrity":"sha512-qJ9hv4uv6RfPOjuQ/b/+yBPNoKTpG/IO6xxJhm7OCi06/4xl+SjcgPUmMlCG2FEJeZWccdRT+eTPoZCog9VDvA==","signatures":[{"sig":"MEUCIAk0sIxLG1RL2nz2SzPHUhXZDXuZUWN3Yf8bnbn0OFRuAiEA8A5uQ1+mBUQcHfcWhpEM6+Tdj7IxGN/nS+DPUnWTLKI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":441880},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"bee9f858c590bbe8a9a624f66b8da1e1f6322eb0","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.54","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.39","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.6.1_1716565635025_0.8661059151491186","host":"s3://npm-registry-packages"}},"5.6.2":{"name":"@akord/akord-js","version":"5.6.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.6.2","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"7397faacd88703b8655ac775adf97cdb8749d168","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.6.2.tgz","fileCount":145,"integrity":"sha512-eO5AiqsR8CUJ0ZwHSGnfzAfhm/mqnctv7vqkQlEkAveYsg5vTJggVm/OTTiRpE5zXoW6LbA9yOEu3ktg/mC0Dw==","signatures":[{"sig":"MEQCIAIjRevwEP4f2Z0j0lnfvMIEcopqAhs3o6HXRQpWEpDTAiAENupK7kuTPpkhQp1Azpz+aR+KWJ/9urYdmDhkewf/zg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":441913},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"ba2b4de4c92774f7216b78ad8c8c78f633685e65","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.41","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.6.2_1716819885387_0.4315429564256965","host":"s3://npm-registry-packages"}},"5.6.3":{"name":"@akord/akord-js","version":"5.6.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.6.3","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"05bac8eb2af03ffbb29974ed1d4d01efc35ce905","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.6.3.tgz","fileCount":145,"integrity":"sha512-bSbi/z0rN8Zb9DSshdSsrzRapaFtAwMkDcpZLuJXbjTcOYuCye6oZScAi9TDZAd5Rxby6so44nAOigLosRu8vA==","signatures":[{"sig":"MEUCIE+mIVu6p8R5zBrXi3jBtK8i55vw2NIS9IjSUHSOHb8OAiEA9SpxGonk5WjqozrPbdGgxL59kAUhJYotxww3uM7q21c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":441913},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"798ad1cc6dbd85f081c078b7534bff129197100c","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.4","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.20.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.42","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.6.3_1716844222189_0.9174073990547051","host":"s3://npm-registry-packages"}},"5.6.4-beta.1":{"name":"@akord/akord-js","version":"5.6.4-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.6.4-beta.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"7b1ff2a1c27179bd9dd03969bac4d5ca9e3c1f0c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.6.4-beta.1.tgz","fileCount":145,"integrity":"sha512-bCO41rp3sTcnBrKmJS2xjR3xSn7ui33xADjhIwDkjVqu+sSICH8gUCdeIFjDSszj05l0DMndNU3i1gB2JwzYmw==","signatures":[{"sig":"MEUCIQDv+877fVh3QHRmFUveNypM4f55StpXYnT7QxX/Q14QgAIgFD7qXpNrVnfPwV4438Km6stX+Uw0xiwRRQRTYqyvQM0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":441828},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"db8289b488e95d0df0a5e07d5e91f6cc1de4454f","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.42","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.6.4-beta.1_1716965785167_0.2761802385674872","host":"s3://npm-registry-packages"}},"5.6.3-beta.2":{"name":"@akord/akord-js","version":"5.6.3-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.6.3-beta.2","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"77479863fa1030b2f8d20b8bb224bab741f351c4","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.6.3-beta.2.tgz","fileCount":147,"integrity":"sha512-WjwJaKimRCEvYOpnJB0pqjKes9PBXuFYwbvwiKM/yalQ0sZ9uSU32cOttgfsS1Ft7KFGfnH75GMb3qEVCSPCYQ==","signatures":[{"sig":"MEUCIC6lBJokFhUdDzyes2bEqL3sI4CeJxvlVoMwq4063GZkAiEA2irMVwI/M4/jDBI5afsC1Fipga9rCHg/HWRtnqVnFsI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":442507},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"47954d0956c488e7e3362bd54aa810a1befab15b","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.43","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.6.3-beta.2_1716985029696_0.05320128346075137","host":"s3://npm-registry-packages"}},"5.7.1":{"name":"@akord/akord-js","version":"5.7.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.7.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"70cb2bd96a2403272cfb8fe2c733f79f02c1b0ca","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.7.1.tgz","fileCount":147,"integrity":"sha512-+bdBPFol9VGkCuAq7x4x46ZuI5YpZmVCtcoZmgshJRdPBm/jQkGQqhPtHhL2keczSNmZsBFyYHEmpyLav16mdA==","signatures":[{"sig":"MEUCIQCYIYLBqw1I8yONoihJ1EUuXQ9GPN4A/DuO9ws0nJMg7gIgG63vjq/zWZpXmZqcc2P8Fbywvr+VW8PsQMpqxQrJzbE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":442479},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"1797a37acaa4904edd7e3cfeb727e87e4cf2f413","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.5.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.13.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.43","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.7.1_1716990359301_0.35132264725014717","host":"s3://npm-registry-packages"}},"5.8.0-beta.1":{"name":"@akord/akord-js","version":"5.8.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.8.0-beta.1","maintainers":[{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e99996a1391cf9b0d31c796bcd6308648afcb70f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.8.0-beta.1.tgz","fileCount":147,"integrity":"sha512-KopOcNDvyyWKnWL+C3WbIbfhE5JgbPy+IIclcpVvKDp5MFnJwD5j2m6FGlU0GGU92xt0vbfhKTccuPFg6HPd3A==","signatures":[{"sig":"MEUCIQD1STx24GM/0JSoJdFLlNJt3XOc7Q34COZmCv9fJR+/PQIgauN3jZr1Yhy2PMYAUHMX7OZzURV18IbUZKnx3EWkM08=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":442786},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js >= 18\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=18.0.0"},"gitHead":"a47469fcedc35efe854b0fcaf639faa84518399a","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.12.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.43","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.8.0-beta.1_1717356460986_0.6199384034793531","host":"s3://npm-registry-packages"}},"5.8.0-beta.2":{"name":"@akord/akord-js","version":"5.8.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.8.0-beta.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a1ddbf06c8d4581f65cbb51a5de79713eafaa830","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.8.0-beta.2.tgz","fileCount":147,"integrity":"sha512-uifu0AQJEB/c3FunEsbb3vOubRXoe9s66Ad3HTQxAfsIllpZJnorR3Uquh5P3zK7/bsnCrRgKszqsWAr1eh5aQ==","signatures":[{"sig":"MEUCIQD/QViMNlGL67xQwPael2yuP4EJMvsck0pYtyeDkUVhuwIgKbMb0n60Ybi69DMGOLKykmDE46hjzlOD3/V7eX00a0Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":442895},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js >= 18\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=18.0.0"},"gitHead":"8b5710318224424a31ddf55c3f5fd204593dc410","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.12.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.43","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.8.0-beta.2_1717431452976_0.5580975070699234","host":"s3://npm-registry-packages"}},"5.8.0-beta.4":{"name":"@akord/akord-js","version":"5.8.0-beta.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.8.0-beta.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"de282ec69a6aa7be57546e386aac64516c80b499","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.8.0-beta.4.tgz","fileCount":147,"integrity":"sha512-bHHRk12D+asyygI+WlEQ01G00Yp3QQDFfrYXOxzeWMQf2xs16lhRiy5wgPA2QNkAZ0Bkty/WNc6wNVQtiWkr7Q==","signatures":[{"sig":"MEYCIQC4ekKkL34vZErwvB+yzB2gdwJQH3ACehw9upx8gXPmtAIhAOg41Vl+AnRfHjeZkhEwi/LG3GvQa+iyk0BMBoYVsbh2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":442895},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js >= 18\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=18.0.0"},"gitHead":"7f43b8600400a6e9a221641e4efbb9fe92a4ebc7","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.12.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.8.0-beta.4_1717513712320_0.6813402942267937","host":"s3://npm-registry-packages"}},"5.8.0":{"name":"@akord/akord-js","version":"5.8.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.8.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"372fd048ea95e16db45298b5925b7637152bdef3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.8.0.tgz","fileCount":147,"integrity":"sha512-XBg1BfXne3xsSeH3Iy0+DKFSWZXKjUh4p2K1oJYQfBpgkxQKEP1LvVcpWGfedqkUFXRvEqR+zxVrvlTSSOkTVw==","signatures":[{"sig":"MEQCIACi6i+OmuoiQ6M6F/0Cekt4YKVARGpW7+DxlClEDd/rAiAV0lTFrz95B/xMr86IAsy7c4sd2MRGXo3/qe1E932CYw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":443470},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"be8f0379a05dbbc9e9454b978dc4414c06cdc42c","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.5.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.13.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.8.0_1717665045539_0.40292487887341455","host":"s3://npm-registry-packages"}},"5.8.1":{"name":"@akord/akord-js","version":"5.8.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.8.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"558a358ac7530e7ac8e5ad23cc162f04bc2a01bd","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.8.1.tgz","fileCount":147,"integrity":"sha512-8p37IFf5Orxixrl3XYL9l1vBKlLMrMA9441IhMDU2GImDTrKrnGCZhg8WmZaG0YkE+EAmQF1ysLMqYtMf7YprA==","signatures":[{"sig":"MEUCICnnTaP8NWlto40Hy+v/pdMC3cOOXvm1i3AWGzGwPu6qAiEA0QRGoYZwvxf+ka2lsTDNV5PtEfUo+A9JyadqVJYcXaY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":443648},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"7c6a88e96401a2a2f700eba9f9e1542db149fab1","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.5.2","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.13.1","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.8.1_1717667925903_0.40001147976739104","host":"s3://npm-registry-packages"}},"5.8.2":{"name":"@akord/akord-js","version":"5.8.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.8.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"2403cbf716ea63b63fc5f79b24f74f0abd4f83b5","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.8.2.tgz","fileCount":147,"integrity":"sha512-nV24vKFHpZ9V8fzDIM9omuFR9vONEb+q1fPVZ5EL3hP1GrUuf+S8t8kdRK8BgzFoebm4N37c7I9nVLDV3QIGaQ==","signatures":[{"sig":"MEYCIQDRvGFBbgUsAX+zDU4/3VzVnSf2W/81Nl/+jdVcQyALnQIhALNbiYLutNHwh7Be+3XJfF+HwM07XsyD3HeV1eObFl1f","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":443727},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"435161fa2a56f34fabefc7583ba7f61b44b5435c","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.7.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.14.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.8.2_1717672934181_0.8547216953910333","host":"s3://npm-registry-packages"}},"5.9.0":{"name":"@akord/akord-js","version":"5.9.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.9.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"00c08c521caf5f33805fcc37f57acddece58a6ce","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.9.0.tgz","fileCount":151,"integrity":"sha512-79z6ZE02UyZHbFCqin65N/g5ZM7nJzXJuXiwh4+PWPKIrq9JcOWVldeMWtQ7MJJBjNkEQ0Q8MKdmEGUJDk0gvQ==","signatures":[{"sig":"MEUCIEkcQYxPqiKp06TTLXk9YBSEOEXOIS8Adl6cRODQUMZwAiEA2wfq0pUDwYGz3NxENHNuzfaXRqkJMOrhweh5NmDCfqg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":451773},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"beba2183c336443fb56d0939bc709779da9842c8","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.7.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.14.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.9.0_1718028666593_0.8588237697301109","host":"s3://npm-registry-packages"}},"5.10.0":{"name":"@akord/akord-js","version":"5.10.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.10.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d4457392ea37ad08807b7abdb74c38f63d1525f3","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.10.0.tgz","fileCount":153,"integrity":"sha512-vgMvpRIyGspoOTB7IWFUX5XpwrYHF+hBkNQL9PqzphWPX2zMlDGy6yS/jmVSIZB9zCFDms1niXkSlIbAWFbzrA==","signatures":[{"sig":"MEMCH3EpkQucionJH4OcK0do0mToiTNhqmOChnN3m6JNcM0CIGwWEhO6cNK35E/ZOnExv1ke7C68TsNl8iTHVYyuReHS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":453911},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"884a792f9850e6c3fff3d6bc0d88db92164e6c81","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.7.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.14.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.10.0_1718207474213_0.05191489223552748","host":"s3://npm-registry-packages"}},"5.4.0-alpha.11":{"name":"@akord/akord-js","version":"5.4.0-alpha.11","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.4.0-alpha.11","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1ad04b741f145415e8799464b5c1dbc8943950e7","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.4.0-alpha.11.tgz","fileCount":147,"integrity":"sha512-MODYkYr13SsiTXYMG+RL7cbJOUdxcZa6XOrgC6IieXa77AwT8m/iAdUHJX5Qtd3oSKuy9admykggyZC/TDg2fQ==","signatures":[{"sig":"MEUCIQCLpKGJq0BfTiKsQwfr6SaVzv6SJjxygJrT5K3kBnhkZAIgNMUtZR+wSq9UhtPdbY8p06VD8UcXRNSDS4XCXi5ANgM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":440412},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js 16\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n\n### Development\n> requires Node.js 16\n\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=16.0.0"},"gitHead":"b73367d6ef6352544766fdda38aa30ce83786d19","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.54","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.0-alpha.13","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.4.0-alpha.11_1718277640468_0.6985615191540506","host":"s3://npm-registry-packages"}},"5.11.0":{"name":"@akord/akord-js","version":"5.11.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.11.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"8345d81414963560e7fe0641ebc8ab867d0d7b6a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.11.0.tgz","fileCount":159,"integrity":"sha512-JuvhrLIK8bs9ZI5Gx/038X7dvPa3YLxdU3Jbm4RGFFIKYGhzPaq/DOsEfxxHO7aTaVeXAdgcfUxKE/VKY2AIwQ==","signatures":[{"sig":"MEQCIBXwzdkKyhXg4Oh8Ez4yxROBZe7+tuaSi9ELdzpzIz06AiASigozY2bXYYcMTUX9A7j0zbmpH7RO0aHeNz4E81pjkw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":456249},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"421e5b495e7f0bf4505d42b77b7618253415e77d","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.7.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.14.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.11.0_1718288780970_0.28260119385866367","host":"s3://npm-registry-packages"}},"5.12.0-beta.0":{"name":"@akord/akord-js","version":"5.12.0-beta.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.0-beta.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"19795876e6f825cb0f9a9fb36a7ea460fdbcd51e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.0-beta.0.tgz","fileCount":159,"integrity":"sha512-CjQlOovgcJzAmYVaNSZ7FOa3gv7aAAJCF+H1HixrTAsVjKszeqp6wyKRp0zL05s7t4WyFElmP2nHnDKWVqkbCA==","signatures":[{"sig":"MEYCIQDZXsM+4EQ5ZGCSIQe0KP2U6u0JoCx8kbqEvIluxoro0gIhAKtxBc2s+Mj6IPld1lxj30PXoc/1EuWoci+dTVnvVZZx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":457171},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n  - [Storage](#storage)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js >= 18\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `list(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated zips uploaded by user\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 zips for given user\nconst { items } = await akord.zip.list();\n\n// retrieve first 20 zips for given user\nconst { items, nextToken } = await akord.zip.list({ limit: 20 });\n// retrieve next 10 zips for given user\nconst { items } = await akord.zip.list({ limit: 10, nextToken: nextToken });\n\n```\n</details>\n\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<ZipLog>>` - Promise with all zip logs for given account\n\n<details>\n  <summary>example</summary>\n\n```js\nconst zips = await akord.zip.listAll();\n```\n</details>\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n\n### storage\n\n#### `get()`\n- returns `Promise<Storage>` - Promise with user storage balance\n\n<details>\n  <summary>example</summary>\n\n```js\nconst storage = await akord.storage.get();\n```\n</details>\n\n#### `buy()`\nPay for storage. Increases Permanent Storage balance \n- returns `Promise<StorageBuyResponse>` - Promise with price `amount` & `currencyCode`. Contains `paymentId` for non sumulated payments.\n\n<details>\n  <summary>example</summary>\n\n```js\nconst gigabytesToBuy = 2;\nconst { amount, currencyCode } = await akord.storage.buy(gigabytesToBuy, { simulate: true }); // no actual payment, just check price\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3); // initiate payment for 3 GB's: no storage increase yet, no payment yet\n\nawait akord.storage.buy({ paymentId }); // confirm the payment: storage increase after successful payment\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3, { currencyCode: 'EUR', confirm: true }); // auto-confirm payment for 3 GB's: storage increase after successful payment\n```\n</details>\n\n### Development\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=18.0.0"},"gitHead":"9ff0febe1362cd2888ff40aacc89ac1a0083db2e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"8.19.3","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"18.13.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.0-beta.0_1718378422129_0.36827573824584436","host":"s3://npm-registry-packages"}},"5.12.0-beta.1":{"name":"@akord/akord-js","version":"5.12.0-beta.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.0-beta.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"c1645e48cd87dc84d838cec1818355c781cfbd72","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.0-beta.1.tgz","fileCount":159,"integrity":"sha512-R2nr6p4Pj2fQlueEjWEjI2nIFiUKg2AkMxWaAk3lSCORAIcG8kEMiynK9lFmjAG5CBGYfvAaIJ4ecqKcIFZedw==","signatures":[{"sig":"MEUCIBbjEnpMgnaUpfhSQVX+IQc3VOUrHqL/r6y84mJ8BNKWAiEArpbwZSZFZaoM0QJDZDfxHMP1K3d/jpKaz0pTj8NxW00=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":456892},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n  - [Storage](#storage)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js >= 18\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `list(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated zips uploaded by user\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 zips for given user\nconst { items } = await akord.zip.list();\n\n// retrieve first 20 zips for given user\nconst { items, nextToken } = await akord.zip.list({ limit: 20 });\n// retrieve next 10 zips for given user\nconst { items } = await akord.zip.list({ limit: 10, nextToken: nextToken });\n\n```\n</details>\n\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<ZipLog>>` - Promise with all zip logs for given account\n\n<details>\n  <summary>example</summary>\n\n```js\nconst zips = await akord.zip.listAll();\n```\n</details>\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n\n### storage\n\n#### `get()`\n- returns `Promise<Storage>` - Promise with user storage balance\n\n<details>\n  <summary>example</summary>\n\n```js\nconst storage = await akord.storage.get();\n```\n</details>\n\n#### `buy()`\nPay for storage. Increases Permanent Storage balance \n- returns `Promise<StorageBuyResponse>` - Promise with price `amount` & `currencyCode`. Contains `paymentId` for non sumulated payments.\n\n<details>\n  <summary>example</summary>\n\n```js\nconst gigabytesToBuy = 2;\nconst { amount, currencyCode } = await akord.storage.buy(gigabytesToBuy, { simulate: true }); // no actual payment, just check price\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3); // initiate payment for 3 GB's: no storage increase yet, no payment yet\n\nawait akord.storage.buy({ paymentId }); // confirm the payment: storage increase after successful payment\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3, { currencyCode: 'EUR', confirm: true }); // auto-confirm payment for 3 GB's: storage increase after successful payment\n```\n</details>\n\n### Development\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=18.0.0"},"gitHead":"0b2b0d7037f5a91a81ebc0b3d8821b797d94f70e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"kgracki","email":"kacpergracki@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.5.1","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"21.7.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","lodash":"^4.17.21","form-data":"^4.0.0","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.0-beta.1_1718626474232_0.565623314506613","host":"s3://npm-registry-packages"}},"5.12.0-beta.2":{"name":"@akord/akord-js","version":"5.12.0-beta.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.0-beta.2","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"44a67ade2107f10a041cbf6ff10cadec6f2bd0b0","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.0-beta.2.tgz","fileCount":159,"integrity":"sha512-ulHPB1/ky9YZFQzVjI5cOKFFtm9gzl27wzGGhn812Q9eGxAeZkiA6b5IiJKJbZx3BCicCuNkqeWXcCI//MfQFg==","signatures":[{"sig":"MEYCIQCG0L/S3qAEh3sYYrQvF0UG7rbHGlPXE4bw1dKl5nezpAIhAPUYjyVj/zwaigbaXss9VGU8dfX5fcJajkEJt8hjRjEL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":456922},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n  - [Storage](#storage)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js >= 18\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `list(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated zips uploaded by user\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 zips for given user\nconst { items } = await akord.zip.list();\n\n// retrieve first 20 zips for given user\nconst { items, nextToken } = await akord.zip.list({ limit: 20 });\n// retrieve next 10 zips for given user\nconst { items } = await akord.zip.list({ limit: 10, nextToken: nextToken });\n\n```\n</details>\n\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<ZipLog>>` - Promise with all zip logs for given account\n\n<details>\n  <summary>example</summary>\n\n```js\nconst zips = await akord.zip.listAll();\n```\n</details>\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n\n### storage\n\n#### `get()`\n- returns `Promise<Storage>` - Promise with user storage balance\n\n<details>\n  <summary>example</summary>\n\n```js\nconst storage = await akord.storage.get();\n```\n</details>\n\n#### `buy()`\nPay for storage. Increases Permanent Storage balance \n- returns `Promise<StorageBuyResponse>` - Promise with price `amount` & `currencyCode`. Contains `paymentId` for non sumulated payments.\n\n<details>\n  <summary>example</summary>\n\n```js\nconst gigabytesToBuy = 2;\nconst { amount, currencyCode } = await akord.storage.buy(gigabytesToBuy, { simulate: true }); // no actual payment, just check price\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3); // initiate payment for 3 GB's: no storage increase yet, no payment yet\n\nawait akord.storage.buy({ paymentId }); // confirm the payment: storage increase after successful payment\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3, { currencyCode: 'EUR', confirm: true }); // auto-confirm payment for 3 GB's: storage increase after successful payment\n```\n</details>\n\n### Development\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=18.0.0"},"gitHead":"84aba5c42296f9b8816e4dac5359e7bb35948b31","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"kgracki","email":"kacpergracki@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.5.1","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"21.7.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","buffer":"^6.0.3","lodash":"^4.17.21","form-data":"^4.0.0","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.0-beta.2_1718631381120_0.7499494355287522","host":"s3://npm-registry-packages"}},"5.12.0-beta.3":{"name":"@akord/akord-js","version":"5.12.0-beta.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.0-beta.3","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"723a0897fa3dbf290b81a7dfb58d1a6fea83ee4c","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.0-beta.3.tgz","fileCount":159,"integrity":"sha512-5dvZwRb1psDuZa8T9S8aGjwu8rLiaUEJk0hDL+XZfcAk2GgU3pr3KtEFYfMh1dAFiZIM64nXuAVvOa9zHoTtIw==","signatures":[{"sig":"MEUCIQDqDks9XlRvQ5gmwl9Jge1ra9aM9mu5jS68OJ1TkdZyZAIgCRCZRjUfO7pgXrfI6BP9W+ZZjQldMd3OxgWIpn3dQWc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":457249},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n  - [Storage](#storage)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js >= 18\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `list(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated zips uploaded by user\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 zips for given user\nconst { items } = await akord.zip.list();\n\n// retrieve first 20 zips for given user\nconst { items, nextToken } = await akord.zip.list({ limit: 20 });\n// retrieve next 10 zips for given user\nconst { items } = await akord.zip.list({ limit: 10, nextToken: nextToken });\n\n```\n</details>\n\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<ZipLog>>` - Promise with all zip logs for given account\n\n<details>\n  <summary>example</summary>\n\n```js\nconst zips = await akord.zip.listAll();\n```\n</details>\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n\n### storage\n\n#### `get()`\n- returns `Promise<Storage>` - Promise with user storage balance\n\n<details>\n  <summary>example</summary>\n\n```js\nconst storage = await akord.storage.get();\n```\n</details>\n\n#### `buy()`\nPay for storage. Increases Permanent Storage balance \n- returns `Promise<StorageBuyResponse>` - Promise with price `amount` & `currencyCode`. Contains `paymentId` for non sumulated payments.\n\n<details>\n  <summary>example</summary>\n\n```js\nconst gigabytesToBuy = 2;\nconst { amount, currencyCode } = await akord.storage.buy(gigabytesToBuy, { simulate: true }); // no actual payment, just check price\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3); // initiate payment for 3 GB's: no storage increase yet, no payment yet\n\nawait akord.storage.buy({ paymentId }); // confirm the payment: storage increase after successful payment\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3, { currencyCode: 'EUR', confirm: true }); // auto-confirm payment for 3 GB's: storage increase after successful payment\n```\n</details>\n\n### Development\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=18.0.0"},"gitHead":"0c50ed5d5d21b8488c77baa4faf14dceeebecb77","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"kgracki","email":"kacpergracki@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.5.1","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"21.7.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","buffer":"^6.0.3","lodash":"^4.17.21","form-data":"^4.0.0","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.0-beta.3_1718634723701_0.5170438690378181","host":"s3://npm-registry-packages"}},"5.12.0-beta.4":{"name":"@akord/akord-js","version":"5.12.0-beta.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.0-beta.4","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"e565cf0a2f01786125981e467eb175e3004f8468","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.0-beta.4.tgz","fileCount":159,"integrity":"sha512-6Otr/GzFV3O7zInc2z9pZK2ggkwcZlojxhWNjnypW3wdKZcG89PsbNCesESiepMfgWR4vxWt8p3i+tRVE5bTDg==","signatures":[{"sig":"MEUCIHdlHOVk29scOM8KLTdQPCTuCpBfD/unxIpCoGu4rOaSAiEA8pIqsn3uLWYBlWymAhpxnsV1PGG4MWTaxDI7ScRO4cw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":457423},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n  - [Storage](#storage)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js >= 18\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `list(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated zips uploaded by user\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 zips for given user\nconst { items } = await akord.zip.list();\n\n// retrieve first 20 zips for given user\nconst { items, nextToken } = await akord.zip.list({ limit: 20 });\n// retrieve next 10 zips for given user\nconst { items } = await akord.zip.list({ limit: 10, nextToken: nextToken });\n\n```\n</details>\n\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<ZipLog>>` - Promise with all zip logs for given account\n\n<details>\n  <summary>example</summary>\n\n```js\nconst zips = await akord.zip.listAll();\n```\n</details>\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n\n### storage\n\n#### `get()`\n- returns `Promise<Storage>` - Promise with user storage balance\n\n<details>\n  <summary>example</summary>\n\n```js\nconst storage = await akord.storage.get();\n```\n</details>\n\n#### `buy()`\nPay for storage. Increases Permanent Storage balance \n- returns `Promise<StorageBuyResponse>` - Promise with price `amount` & `currencyCode`. Contains `paymentId` for non sumulated payments.\n\n<details>\n  <summary>example</summary>\n\n```js\nconst gigabytesToBuy = 2;\nconst { amount, currencyCode } = await akord.storage.buy(gigabytesToBuy, { simulate: true }); // no actual payment, just check price\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3); // initiate payment for 3 GB's: no storage increase yet, no payment yet\n\nawait akord.storage.buy({ paymentId }); // confirm the payment: storage increase after successful payment\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3, { currencyCode: 'EUR', confirm: true }); // auto-confirm payment for 3 GB's: storage increase after successful payment\n```\n</details>\n\n### Development\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=18.0.0"},"gitHead":"37e724d0ddabcf2df2c4423650402a2b5ea6a13b","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"kgracki","email":"kacpergracki@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.5.1","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"21.7.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","buffer":"^6.0.3","lodash":"^4.17.21","form-data":"^4.0.0","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.0-beta.4_1718638322534_0.7036214846714506","host":"s3://npm-registry-packages"}},"5.12.0-beta.5":{"name":"@akord/akord-js","version":"5.12.0-beta.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.0-beta.5","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a6375e583c374357dc3c39364780b76316ce1c89","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.0-beta.5.tgz","fileCount":159,"integrity":"sha512-Pfkk8b7EfaChXiraN+2THkZsTVPQFa3pSdQ0De6hcT6lyabCwRDf+UGOG0fsdJaVMPeisahFV6sxcUhDWW+oWw==","signatures":[{"sig":"MEQCICsyY/jagYK1/ayGP0lHApq2F3xuig7zQod+buo3bkYEAiAeiyx9W8PqQ7XTAoFTULrY8aQc0wpBMhYEIj/KdxtdpA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":457423},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n  - [Storage](#storage)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js >= 18\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `list(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated zips uploaded by user\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 zips for given user\nconst { items } = await akord.zip.list();\n\n// retrieve first 20 zips for given user\nconst { items, nextToken } = await akord.zip.list({ limit: 20 });\n// retrieve next 10 zips for given user\nconst { items } = await akord.zip.list({ limit: 10, nextToken: nextToken });\n\n```\n</details>\n\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<ZipLog>>` - Promise with all zip logs for given account\n\n<details>\n  <summary>example</summary>\n\n```js\nconst zips = await akord.zip.listAll();\n```\n</details>\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n\n### storage\n\n#### `get()`\n- returns `Promise<Storage>` - Promise with user storage balance\n\n<details>\n  <summary>example</summary>\n\n```js\nconst storage = await akord.storage.get();\n```\n</details>\n\n#### `buy()`\nPay for storage. Increases Permanent Storage balance \n- returns `Promise<StorageBuyResponse>` - Promise with price `amount` & `currencyCode`. Contains `paymentId` for non sumulated payments.\n\n<details>\n  <summary>example</summary>\n\n```js\nconst gigabytesToBuy = 2;\nconst { amount, currencyCode } = await akord.storage.buy(gigabytesToBuy, { simulate: true }); // no actual payment, just check price\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3); // initiate payment for 3 GB's: no storage increase yet, no payment yet\n\nawait akord.storage.buy({ paymentId }); // confirm the payment: storage increase after successful payment\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3, { currencyCode: 'EUR', confirm: true }); // auto-confirm payment for 3 GB's: storage increase after successful payment\n```\n</details>\n\n### Development\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=18.0.0"},"gitHead":"37e724d0ddabcf2df2c4423650402a2b5ea6a13b","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"kgracki","email":"kacpergracki@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.5.1","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"21.7.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","buffer":"^6.0.3","lodash":"^4.17.21","form-data":"^4.0.0","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.0-beta.5_1718641233935_0.6027389491369792","host":"s3://npm-registry-packages"}},"5.12.0-beta.6":{"name":"@akord/akord-js","version":"5.12.0-beta.6","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.0-beta.6","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"d4d6989192cbdab8a51c929cc20d4cc9790d5a91","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.0-beta.6.tgz","fileCount":159,"integrity":"sha512-WgFqr8LRPLybnd5gu0v5R2Dtgwf03fRlNkKyngUf7s5KKQGKbLJGR2xsBRoTyBdzxN+T4o96RRmNzDNtLsRoxA==","signatures":[{"sig":"MEQCIHeV+bXr8pmhZBaBAGb4lOarFhGpZjq9AjP+xKbqG8VaAiAfQySMMJy1a/D1EY0pPm4wUWGXXBMHIqCvkpZpmqH1Rg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":457319},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n  - [Storage](#storage)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js >= 18\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId, manifest)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault state.\n\n- `vaultId` (`string`, required)\n- `manifest` (`JSON`, optional) - manifest JSON\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId, uri } = await akord.manifest.generate(vaultId);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `list(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated zips uploaded by user\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 zips for given user\nconst { items } = await akord.zip.list();\n\n// retrieve first 20 zips for given user\nconst { items, nextToken } = await akord.zip.list({ limit: 20 });\n// retrieve next 10 zips for given user\nconst { items } = await akord.zip.list({ limit: 10, nextToken: nextToken });\n\n```\n</details>\n\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<ZipLog>>` - Promise with all zip logs for given account\n\n<details>\n  <summary>example</summary>\n\n```js\nconst zips = await akord.zip.listAll();\n```\n</details>\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n\n### storage\n\n#### `get()`\n- returns `Promise<Storage>` - Promise with user storage balance\n\n<details>\n  <summary>example</summary>\n\n```js\nconst storage = await akord.storage.get();\n```\n</details>\n\n#### `buy()`\nPay for storage. Increases Permanent Storage balance \n- returns `Promise<StorageBuyResponse>` - Promise with price `amount` & `currencyCode`. Contains `paymentId` for non sumulated payments.\n\n<details>\n  <summary>example</summary>\n\n```js\nconst gigabytesToBuy = 2;\nconst { amount, currencyCode } = await akord.storage.buy(gigabytesToBuy, { simulate: true }); // no actual payment, just check price\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3); // initiate payment for 3 GB's: no storage increase yet, no payment yet\n\nawait akord.storage.buy({ paymentId }); // confirm the payment: storage increase after successful payment\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3, { currencyCode: 'EUR', confirm: true }); // auto-confirm payment for 3 GB's: storage increase after successful payment\n```\n</details>\n\n### Development\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]:https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n","engines":{"node":">=18.0.0"},"gitHead":"62f9fdc2ef49f29ec5ab7bad767fcd2348735c97","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"kgracki","email":"kacpergracki@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.5.1","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"21.7.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","buffer":"^6.0.3","lodash":"^4.17.21","form-data":"^4.0.0","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.0-beta.6_1718641569424_0.20373125299296335","host":"s3://npm-registry-packages"}},"5.12.0-beta.7":{"name":"@akord/akord-js","version":"5.12.0-beta.7","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.0-beta.7","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"b37143df2ffa0b36abdb4fa060977ae55ad01dba","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.0-beta.7.tgz","fileCount":159,"integrity":"sha512-UoUeSdFAt3/51r8CUdk9+BXIqrgWdITKof8Bfy0Or76YdowHSfL0Kb0nXw0L9eG7/T/LcjKMit7Vlv7mjVGewg==","signatures":[{"sig":"MEUCICMqXbfmQC7j1LY+2rN8+3FYx7uUvyyShMWs5Z+KPCVuAiEAxzSs2w1FbLGm8bV/Sn7qKnPg2aQ7L2xz9OAN6xYXJf0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":458860},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n  - [Storage](#storage)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js >= 18\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault/folder state.\n\n- `vaultId` (`string`, required)\n- `options` ([`ManifestOptions`][manifest-options], optional) - parent id, custom index, manually created manifest, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// generate manifest for the entire vault contents\nconst { uri } = await akord.manifest.generate(vaultId);\nconsole.log(\"Manifest link: https://arweave.net/\" + uri);\n```\n\n```js\n// generate manifest for a specific folder\nconst { uri } = await akord.manifest.generate(vaultId, { parentId: folderId });\nconsole.log(\"Manifest link: https://arweave.net/\" + uri);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `list(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated zips uploaded by user\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 zips for given user\nconst { items } = await akord.zip.list();\n\n// retrieve first 20 zips for given user\nconst { items, nextToken } = await akord.zip.list({ limit: 20 });\n// retrieve next 10 zips for given user\nconst { items } = await akord.zip.list({ limit: 10, nextToken: nextToken });\n\n```\n</details>\n\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<ZipLog>>` - Promise with all zip logs for given account\n\n<details>\n  <summary>example</summary>\n\n```js\nconst zips = await akord.zip.listAll();\n```\n</details>\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n\n### storage\n\n#### `get()`\n- returns `Promise<Storage>` - Promise with user storage balance\n\n<details>\n  <summary>example</summary>\n\n```js\nconst storage = await akord.storage.get();\n```\n</details>\n\n#### `buy()`\nPay for storage. Increases Permanent Storage balance \n- returns `Promise<StorageBuyResponse>` - Promise with price `amount` & `currencyCode`. Contains `paymentId` for non sumulated payments.\n\n<details>\n  <summary>example</summary>\n\n```js\nconst gigabytesToBuy = 2;\nconst { amount, currencyCode } = await akord.storage.buy(gigabytesToBuy, { simulate: true }); // no actual payment, just check price\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3); // initiate payment for 3 GB's: no storage increase yet, no payment yet\n\nawait akord.storage.buy({ paymentId }); // confirm the payment: storage increase after successful payment\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3, { currencyCode: 'EUR', confirm: true }); // auto-confirm payment for 3 GB's: storage increase after successful payment\n```\n</details>\n\n### Development\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]: https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n[manifest-options]: https://github.com/Akord-com/akord-js/blob/9ff0febe1362cd2888ff40aacc89ac1a0083db2e/src/core/manifest.ts#L17\n","engines":{"node":">=18.0.0"},"gitHead":"593081f47db63d23f2ac4fb3b7a475b2341dce60","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"kgracki","email":"kacpergracki@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.5.1","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"21.7.2","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","buffer":"^6.0.3","lodash":"^4.17.21","form-data":"^4.0.0","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.0-beta.7_1718799819979_0.02003417573653299","host":"s3://npm-registry-packages"}},"5.12.0":{"name":"@akord/akord-js","version":"5.12.0","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.0","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"f34a4b2d3906d7ae9e1b9d7861c8cb2bbf08532f","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.0.tgz","fileCount":159,"integrity":"sha512-/52ta+wUO29oxHt5xmo17eVqtYDhR+xzFchEBal4DGWLCnNuic48sf3eP1knSPCrXczwrvfqMlr2KooS8bpZSw==","signatures":[{"sig":"MEYCIQCSfaiie4Vd/pti5K3561UN/zf3wyMaUlv0r/bOr1hMKAIhALxMJzv/30h7ThrAZgSHJSWyYiYlS2qPFrVesjPX9aBW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":458853},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"0116bd468f83aded2b451184675b1ca62c803486","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.7.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.14.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","buffer":"^6.0.3","lodash":"^4.17.21","form-data":"^4.0.0","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.0_1718802322030_0.3777886242957884","host":"s3://npm-registry-packages"}},"5.12.1":{"name":"@akord/akord-js","version":"5.12.1","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.1","maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"a7060bd9580e7119f166b54b52231871f3c165a9","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.1.tgz","fileCount":159,"integrity":"sha512-WLBwS0V8tury1qHB3VM9EuaQr9QEwODvnP/IkBJXcsZYj07RqLt7Hr5j24zyLNYCxstzFnLWf9vVwbLHGPLiKw==","signatures":[{"sig":"MEYCIQC0fd+gxCkhO1gteq/E8G+WaF3bZemO640y0fT1w/4rogIhAOKyohOMMiSeIhYom2rH7elf72fzsyoKUXFqtHvZmpUv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":458853},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"4c9b8acca856210066f2c626c6d54a9876691eec","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.7.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.14.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","buffer":"^6.0.3","lodash":"^4.17.21","form-data":"^4.0.0","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.1_1718804654563_0.19779145860903902","host":"s3://npm-registry-packages"}},"5.12.2":{"name":"@akord/akord-js","version":"5.12.2","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.2","homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"9e47cc9885cc247f16bf1258ce0184fa98763308","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.2.tgz","fileCount":159,"integrity":"sha512-LU7iS/0bem9rVUSPKSuWv7MfAh4MV095no9q6HPjQ5HMzweFfJX85XuVoywaNqinQu82VW7kva6/dlDYOVT2/Q==","signatures":[{"sig":"MEUCIBxULylfiDVZ0NSwjOVVqq9IDulOkUogcH/CUzSM1aJuAiEAqj3yhXlDFF39cpcKmJ1DrHypacZz+Ceo8taN4Fuq8BA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":458821},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"dc3c5ba478e4184e6ef08368c5294b1196f3143e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.7.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.14.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","buffer":"^6.0.3","lodash":"^4.17.21","form-data":"^4.0.0","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.2_1719331365592_0.6331016874670607","host":"s3://npm-registry-packages"}},"5.12.3":{"name":"@akord/akord-js","version":"5.12.3","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.3","homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"1e077285a509647dfea34d8391d7fd8eb23a76bc","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.3.tgz","fileCount":159,"integrity":"sha512-z4SN+D70FspxTED7pJh2fNc02sZRIOs4SIBg/RikhWYfx4H9wz0sT4fzJKassK3osq6ubaDf2qeWD0YYo8rFHQ==","signatures":[{"sig":"MEYCIQCPB9Pdy0g127Li4kxYsvFlLrY7xi8l/FPeLLfoJmqp1gIhAODpbLAy9DXa572RsvJiEudPcWVfozZSWKYmyGyeDKe5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":458853},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"0d0f50632b7ce5e28154afe57f11e2c66a5d8acd","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.7.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.14.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","buffer":"^6.0.3","lodash":"^4.17.21","form-data":"^4.0.0","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.3_1719389972765_0.6357851081628185","host":"s3://npm-registry-packages"}},"5.12.4":{"name":"@akord/akord-js","version":"5.12.4","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.4","homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"eb43be6ed298fc6d8fb28b8e2da287875878a9fb","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.4.tgz","fileCount":159,"integrity":"sha512-kmJQ3DwdhnTROFe1kYgLWlgkPsB8r2yhus9BfuhGQbKc029XSk5kPDgU2AJ186lBaME5d/hd9doAi9eqrS1+Nw==","signatures":[{"sig":"MEQCIFtZr8wZ7xP3Mdzb436OrPQzOez/yuBCVbrTTagiTKPrAiAqkKxtZKChFCcDGdT6rpjJWQ4CdKu6lwWyB/5+xUTv3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":458867},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"4e261e5f22b3b0c8609e41d12cb19ff459527a16","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.7.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.14.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","buffer":"^6.0.3","lodash":"^4.17.21","form-data":"^4.0.0","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.4_1719396110233_0.5053685627908509","host":"s3://npm-registry-packages"}},"5.12.5":{"name":"@akord/akord-js","version":"5.12.5","keywords":["akord","storage","web3","encryption","e2ee"],"author":{"name":"Akord Team"},"license":"MIT","_id":"@akord/akord-js@5.12.5","homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"dist":{"shasum":"cc530eabc39248277791c7b1ab1cbc2db19c199e","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.12.5.tgz","fileCount":159,"integrity":"sha512-d9chqAzlAPFxP8a/h070yoW2gR3irxJduiboEvM1uSJCd1Z1lBoSmOHFKoDe7wMVUbp0uF9okz13wTyU2LtU5A==","signatures":[{"sig":"MEUCIDTL7Rn8QYrZgmH40p7EpweeSYeEIZMwO0VMPXEgoCvOAiEAx6HMiLcw0ZkF1lDTLczik6qQwh+CoA7kFIWcadzWHdU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":458867},"main":"lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"b9d98b3ced4e00cd9a324a8ed0581e7b4aafa77e","scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"repository":{"url":"git+ssh://git@github.com/Akord-com/akord-js.git","type":"git"},"_npmVersion":"10.7.0","description":"A set of core js functions to interact with Akord","directories":{},"_nodeVersion":"20.15.0","dependencies":{"rxjs":"^7.5.6","uuid":"^8.3.2","axios":"0.27.2","buffer":"^6.0.3","lodash":"^4.17.21","form-data":"^4.0.0","cross-fetch":"^4.0.0","@akord/crypto":"0.21.56","@esm2cjs/p-queue":"^7.3.0","@akord/akord-auth":"0.30.44","@akord/ts-cacheable":"1.0.13","web-streams-polyfill":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","pngjs":"^7.0.0","dotenv":"^16.0.2","ts-jest":"^28.0.5","typescript":"4.8.4","@types/jest":"^29.5.5","@types/node":"^17.0.8","@types/uuid":"^8.3.4","@types/pngjs":"^6.0.5","@types/lodash":"^4.14.202","@faker-js/faker":"^6.2.0","@types/streamsaver":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/akord-js_5.12.5_1719484322859_0.4654397223432214","host":"s3://npm-registry-packages"}},"5.13.0":{"name":"@akord/akord-js","version":"5.13.0","description":"A set of core js functions to interact with Akord","main":"lib/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/Akord-com/akord-js.git"},"scripts":{"test":"jest --verbose --collectCoverage=false --forceExit --detectOpenHandles","build":"rm -r lib || true && tsc -p .","prepublish":"yarn build"},"keywords":["akord","storage","web3","encryption","e2ee"],"bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"homepage":"https://github.com/Akord-com/akord-js#readme","author":{"name":"Akord Team"},"license":"MIT","engines":{"node":">=18.0.0"},"dependencies":{"@akord/akord-auth":"0.30.44","@akord/crypto":"0.21.56","@akord/ts-cacheable":"1.0.13","@esm2cjs/p-queue":"^7.3.0","agentkeepalive":"^4.5.0","axios":"0.27.2","buffer":"^6.0.3","cross-fetch":"^4.0.0","form-data":"^4.0.0","lodash":"^4.17.21","rxjs":"^7.5.6","uuid":"^8.3.2","web-streams-polyfill":"^3.2.1"},"devDependencies":{"@faker-js/faker":"^6.2.0","@types/jest":"^29.5.5","@types/lodash":"^4.14.202","@types/node":"^17.0.8","@types/pngjs":"^6.0.5","@types/streamsaver":"^2.0.1","@types/uuid":"^8.3.4","dotenv":"^16.0.2","jest":"^28.1.1","pngjs":"^7.0.0","ts-jest":"^28.0.5","typescript":"4.8.4"},"_id":"@akord/akord-js@5.13.0","gitHead":"a71115a3665e2cecd111550dfe37151246ee230d","types":"./lib/index.d.ts","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-1gpNqoMQtnHjsjO8+J1O2CtSm+gubsmtluTqeeYeu+4yvV8+1Y6GFRpDkz/KRxHG+0sMJ0jwSvUOgRY69p16cg==","shasum":"0c18e080c31d5d4cc98c26f0374eb2b1b5407e4a","tarball":"https://registry.npmjs.org/@akord/akord-js/-/akord-js-5.13.0.tgz","fileCount":161,"unpackedSize":456309,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEjj6FMsbeuvo/N4OnSVBYE7DpRuVm5W9zE+Wbo7gNeQAiEA2o9bQ9KKWpUPcyWFcgRwTj83CempyWJ7o2WxDOdFzCk="}]},"_npmUser":{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/akord-js_5.13.0_1719488699376_0.5994605594419911"},"_hasShrinkwrap":false}},"time":{"created":"2022-06-28T17:27:19.274Z","modified":"2024-06-27T11:44:59.795Z","0.1.0":"2022-06-28T17:27:19.546Z","0.1.1":"2022-06-29T08:55:58.901Z","0.1.2":"2022-06-29T09:11:35.321Z","0.1.3":"2022-06-29T11:21:56.325Z","0.1.4":"2022-06-29T15:06:30.782Z","0.1.5":"2022-06-29T17:28:05.789Z","0.2.0":"2022-07-12T10:26:12.262Z","0.2.1":"2022-07-12T10:42:25.486Z","0.2.2":"2022-07-12T12:52:37.034Z","0.2.3":"2022-07-12T17:38:19.328Z","0.2.4":"2022-07-13T09:49:11.986Z","0.3.0":"2022-07-13T14:50:31.958Z","0.3.1":"2022-07-13T17:04:59.287Z","0.3.2":"2022-07-18T11:31:04.840Z","0.3.3":"2022-07-27T14:20:42.006Z","0.3.4":"2022-08-01T03:54:31.372Z","0.3.5":"2022-08-01T12:31:58.857Z","0.3.6":"2022-08-01T13:06:45.765Z","0.3.7":"2022-08-03T11:02:31.637Z","0.3.8":"2022-08-03T14:16:03.976Z","0.3.9":"2022-08-03T14:26:15.502Z","0.3.10":"2022-08-03T14:30:04.330Z","0.3.11":"2022-08-03T14:35:58.346Z","0.3.12":"2022-08-06T11:39:59.033Z","0.3.13":"2022-08-06T12:25:51.693Z","0.3.14":"2022-08-06T16:50:28.179Z","0.3.15":"2022-08-11T07:05:45.494Z","0.3.16":"2022-08-12T12:30:43.792Z","0.3.17":"2022-08-18T07:10:53.134Z","0.3.18":"2022-08-26T12:31:09.153Z","0.3.19":"2022-08-26T12:54:17.725Z","0.3.20":"2022-08-27T12:15:41.967Z","0.3.21":"2022-08-28T12:46:59.479Z","0.3.22":"2022-08-28T12:47:18.052Z","0.3.23":"2022-08-28T13:27:25.008Z","0.3.24":"2022-08-28T21:29:34.435Z","0.3.25":"2022-08-31T01:08:29.143Z","0.3.26":"2022-08-31T01:56:00.787Z","0.3.26-rc":"2022-09-08T11:21:03.930Z","0.3.27":"2022-09-08T15:15:06.150Z","0.3.28":"2022-09-09T11:26:34.920Z","0.3.29":"2022-09-09T11:39:18.225Z","0.3.30":"2022-09-12T12:54:59.797Z","0.3.31":"2022-09-12T15:10:29.044Z","0.3.32":"2022-09-12T15:41:10.691Z","0.3.33":"2022-09-12T17:03:14.214Z","0.3.34":"2022-09-12T17:40:14.531Z","0.3.35":"2022-09-12T17:47:10.009Z","0.3.36":"2022-09-13T00:52:39.873Z","0.3.37":"2022-09-13T06:46:59.417Z","0.3.38":"2022-09-13T07:15:09.970Z","0.3.39":"2022-09-13T10:32:04.135Z","0.3.40":"2022-09-13T22:26:25.234Z","0.3.41":"2022-09-14T08:32:26.943Z","0.3.42":"2022-09-14T09:24:13.563Z","0.3.43":"2022-09-14T15:48:46.836Z","0.3.44":"2022-09-14T17:32:47.734Z","0.3.45":"2022-09-14T20:25:06.308Z","0.3.46":"2022-09-16T06:35:40.612Z","0.3.47":"2022-09-20T11:30:53.439Z","0.3.48":"2022-09-20T12:44:11.058Z","0.3.49":"2022-09-20T13:22:13.276Z","0.3.50":"2022-09-20T16:19:39.569Z","0.3.51":"2022-09-20T17:07:46.596Z","0.3.52":"2022-09-21T11:52:07.552Z","0.3.53":"2022-09-21T12:32:29.536Z","0.3.54":"2022-09-21T20:13:49.933Z","0.3.55":"2022-09-23T08:55:00.327Z","0.3.56":"2022-09-23T10:50:40.043Z","0.3.57":"2022-09-26T15:41:35.768Z","1.0.1":"2022-09-27T16:09:27.620Z","1.0.2":"2022-09-29T10:00:43.337Z","1.0.3":"2022-09-29T12:01:47.558Z","1.0.4":"2022-09-29T15:09:11.216Z","1.0.5":"2022-09-29T15:11:15.363Z","1.0.6":"2022-09-30T08:02:01.452Z","1.1.0":"2022-09-30T08:08:04.564Z","1.1.1":"2022-09-30T12:45:09.788Z","1.1.2":"2022-09-30T16:19:21.124Z","1.2.0":"2022-10-01T13:54:52.153Z","1.2.1":"2022-10-02T21:57:35.712Z","1.2.2":"2022-10-02T22:10:06.646Z","1.3.0":"2022-10-03T10:25:13.641Z","1.3.1":"2022-10-04T08:26:30.785Z","1.3.2":"2022-10-04T13:12:34.992Z","1.3.3":"2022-10-04T15:42:24.052Z","1.3.4":"2022-10-04T17:43:40.285Z","1.3.5":"2022-10-05T07:53:28.557Z","1.4.0":"2022-10-05T18:10:47.374Z","1.4.1":"2022-10-05T20:53:29.083Z","1.4.2":"2022-10-06T16:37:03.315Z","1.5.0":"2022-10-10T13:24:18.765Z","1.4.1-alfa":"2022-10-10T19:00:13.694Z","1.5.1":"2022-10-12T13:24:39.204Z","1.5.1-alfa":"2022-10-12T17:07:10.284Z","1.5.1-beta":"2022-10-12T18:08:18.855Z","1.5.1-rc1":"2022-10-14T10:43:20.456Z","1.5.1-rc2":"2022-10-17T10:27:22.446Z","1.6.0":"2022-10-18T07:57:49.798Z","1.5.1-rc3":"2022-10-18T12:25:48.237Z","1.5.1-rc4":"2022-10-19T12:31:07.279Z","1.6.0-rc1":"2022-10-20T15:50:18.135Z","1.6.1":"2022-10-20T15:54:41.555Z","1.6.0-rc2":"2022-10-20T16:46:16.384Z","1.6.2":"2022-10-21T08:11:08.851Z","1.6.2-rc1":"2022-10-24T15:30:35.335Z","1.6.2-rc2":"2022-10-25T12:08:00.025Z","1.7.0-beta.0":"2022-11-03T00:27:23.538Z","1.7.0-beta.1":"2022-11-04T08:13:55.475Z","1.7.0-beta.2":"2022-11-07T13:41:00.946Z","1.7.0-beta.3":"2022-11-07T19:22:58.219Z","1.7.0-beta.4":"2022-11-07T19:23:24.610Z","1.7.0":"2022-11-07T22:15:56.461Z","1.8.0-beta.0":"2022-11-08T15:03:14.845Z","1.8.0-beta.1":"2022-11-08T15:07:10.000Z","1.8.0":"2022-11-09T10:37:29.086Z","1.8.1":"2022-11-10T19:51:17.761Z","2.0.0-beta.0":"2022-11-15T21:38:14.208Z","2.0.0-beta.1":"2022-11-16T18:12:33.832Z","2.0.0-beta.2":"2022-11-17T12:52:16.050Z","2.0.0-beta.3":"2022-11-18T12:54:06.408Z","2.0.0-beta.4":"2022-11-18T13:05:32.233Z","2.0.0-beta.5":"2022-11-18T13:06:53.077Z","2.0.0-beta.6":"2022-11-23T15:53:36.780Z","2.0.0-beta.7":"2022-11-23T22:12:45.282Z","2.0.0-beta.8":"2022-11-24T14:32:52.485Z","2.0.0-beta.9":"2022-11-30T11:12:22.799Z","1.9.0":"2022-11-30T12:08:54.084Z","1.9.1":"2022-11-30T14:38:13.498Z","1.9.2":"2022-11-30T15:40:54.207Z","2.0.0-beta.10":"2022-12-01T12:37:16.716Z","2.0.0-beta.11":"2022-12-01T18:52:32.787Z","2.0.0-alpha.0":"2022-12-02T10:34:26.750Z","2.0.0-beta.12":"2022-12-02T15:56:47.687Z","2.0.0-beta.13":"2022-12-02T16:57:12.750Z","2.0.0-beta.14":"2022-12-05T21:42:31.855Z","2.0.0-alpha.1":"2022-12-06T17:22:12.617Z","2.0.0-beta.15":"2022-12-07T17:34:08.553Z","2.0.0-beta.16":"2022-12-08T18:28:36.801Z","2.0.0-alpha.2":"2022-12-09T13:49:42.324Z","1.10.0":"2022-12-09T16:42:15.871Z","2.0.0-beta.17":"2022-12-13T22:20:16.812Z","2.0.0-beta.18":"2022-12-14T11:12:33.480Z","2.0.0-beta.19":"2022-12-14T11:45:01.600Z","2.0.0-beta.20":"2022-12-14T12:52:19.992Z","2.0.0-alpha.3":"2022-12-16T12:37:30.107Z","2.0.0-alpha.4":"2022-12-16T12:47:19.341Z","2.0.0-alpha.5":"2022-12-16T13:39:01.687Z","2.0.0-beta.21":"2022-12-17T01:45:32.930Z","2.0.0-beta.22":"2022-12-17T02:18:26.244Z","2.0.0-beta.23":"2022-12-19T16:21:01.098Z","2.0.0-beta.24":"2022-12-19T16:23:37.179Z","2.0.0-beta.25":"2022-12-19T17:48:53.115Z","2.0.0-alpha.6":"2022-12-20T09:11:46.770Z","2.0.0-beta.26":"2023-01-06T19:09:28.810Z","2.0.0-beta.27":"2023-01-06T19:59:45.313Z","2.1.0":"2023-01-11T18:08:58.423Z","2.1.0-beta.0":"2023-01-13T09:37:35.166Z","2.2.0":"2023-01-13T10:29:12.264Z","2.3.0":"2023-01-15T16:57:29.601Z","2.3.1":"2023-01-16T11:28:06.983Z","2.4.0":"2023-01-16T15:19:41.876Z","2.4.1":"2023-01-18T13:05:45.888Z","2.5.0":"2023-01-18T13:48:41.766Z","2.5.1":"2023-01-18T14:06:44.849Z","2.5.2":"2023-01-19T13:47:45.702Z","2.5.2-beta.0":"2023-01-23T09:16:22.596Z","2.5.3":"2023-01-23T10:04:48.699Z","2.6.0":"2023-01-24T11:14:40.893Z","2.7.0":"2023-01-24T12:47:01.753Z","2.8.0":"2023-01-24T14:03:36.800Z","2.9.0":"2023-01-24T16:22:21.670Z","2.9.1":"2023-01-27T13:23:01.997Z","2.9.2":"2023-01-31T12:53:39.466Z","2.9.3":"2023-01-31T16:26:37.131Z","2.10.0":"2023-02-01T11:06:42.650Z","2.11.0":"2023-02-01T14:31:00.484Z","2.12.0":"2023-02-03T11:38:45.414Z","2.14.2":"2023-02-08T08:16:29.807Z","2.15.0":"2023-02-08T14:39:03.232Z","3.0.0":"2023-02-08T16:51:58.466Z","3.0.1":"2023-02-09T10:02:55.306Z","3.0.2":"2023-02-09T10:46:37.026Z","3.0.3":"2023-02-09T14:10:53.606Z","3.1.0":"2023-02-09T15:05:30.590Z","3.1.1":"2023-02-09T22:33:32.251Z","3.2.0":"2023-02-10T10:13:12.613Z","3.2.1":"2023-02-10T14:25:42.802Z","3.2.2":"2023-02-10T14:28:21.099Z","3.3.0":"2023-02-12T21:12:56.929Z","3.3.1":"2023-02-13T11:26:51.257Z","3.4.0":"2023-02-13T15:31:23.362Z","3.5.0":"2023-02-16T14:56:39.428Z","3.6.0":"2023-02-16T14:58:56.517Z","3.7.0":"2023-02-17T13:46:03.480Z","3.7.1":"2023-02-21T19:00:52.304Z","3.7.2":"2023-02-22T12:34:28.088Z","3.7.3":"2023-02-22T12:57:42.911Z","3.7.4":"2023-02-23T14:03:37.742Z","3.8.0":"2023-02-23T14:34:08.572Z","3.8.1":"2023-02-23T14:56:47.489Z","3.8.2":"2023-02-27T12:59:38.599Z","3.8.3":"2023-02-27T17:03:42.990Z","4.0.0":"2023-03-03T00:53:10.866Z","3.9.0":"2023-03-03T01:14:36.389Z","3.9.1":"2023-03-03T01:22:24.426Z","3.9.2":"2023-03-07T10:57:27.414Z","3.9.3":"2023-03-07T14:11:33.020Z","3.8.4":"2023-03-08T14:23:07.420Z","3.10.0":"2023-03-12T14:34:48.978Z","3.10.1":"2023-03-12T15:25:15.009Z","3.11.0":"2023-03-13T13:34:33.718Z","4.0.0-beta.0":"2023-03-17T19:06:27.145Z","4.0.0-beta.1":"2023-03-18T22:10:32.794Z","4.0.0-beta.2":"2023-03-20T18:59:34.794Z","4.0.0-beta.3":"2023-03-21T07:41:49.226Z","4.0.0-beta.4":"2023-03-21T21:19:06.585Z","3.11.1":"2023-03-22T10:51:28.548Z","4.0.0-beta.5":"2023-03-22T21:21:44.479Z","4.0.0-beta.6":"2023-03-22T23:03:01.968Z","4.0.0-beta.7":"2023-03-22T23:41:05.522Z","4.0.0-beta.8":"2023-03-22T23:56:12.764Z","4.0.0-beta.9":"2023-03-23T14:03:04.437Z","4.0.0-beta.10":"2023-03-24T17:22:35.355Z","3.11.1-beta.0":"2023-03-25T15:12:02.100Z","4.0.0-beta.11":"2023-03-25T16:58:29.877Z","4.0.0-beta.12":"2023-03-26T16:46:29.584Z","3.11.2":"2023-03-27T13:30:15.967Z","3.11.3":"2023-03-29T10:47:52.367Z","4.0.0-beta.13":"2023-03-30T15:18:47.132Z","4.0.0-beta.14":"2023-03-31T18:23:02.807Z","4.0.0-beta.15":"2023-03-31T19:32:46.448Z","4.0.0-beta.16":"2023-04-02T13:59:46.334Z","4.0.0-beta.17":"2023-04-04T08:16:29.385Z","4.0.0-beta.18":"2023-04-06T12:52:55.693Z","4.0.0-beta.19":"2023-04-06T14:58:16.227Z","3.11.4":"2023-04-07T09:04:30.600Z","4.0.0-beta.20":"2023-04-07T09:08:59.438Z","4.0.0-beta.21":"2023-04-08T18:28:32.183Z","4.0.0-beta.22":"2023-04-08T19:16:57.219Z","4.0.0-beta.23":"2023-04-13T07:02:56.371Z","4.0.0-beta.24":"2023-04-13T11:13:46.947Z","4.0.0-beta.25":"2023-04-14T19:30:23.593Z","4.0.0-beta.26":"2023-04-14T19:44:28.322Z","4.0.0-beta.27":"2023-04-14T21:17:51.056Z","4.0.0-beta.28":"2023-04-18T14:01:57.317Z","4.0.0-beta.29":"2023-04-18T14:25:09.131Z","4.0.0-beta.30":"2023-04-18T17:01:01.517Z","4.0.0-beta.31":"2023-04-20T10:38:18.930Z","4.0.1":"2023-04-25T09:21:40.890Z","4.0.2":"2023-04-25T14:59:41.374Z","4.1.0":"2023-04-25T15:30:32.986Z","4.1.1":"2023-04-27T10:49:14.642Z","4.2.0-beta":"2023-04-27T20:18:28.713Z","4.0.0-alpha.0":"2023-05-02T15:16:09.197Z","4.0.0-alpha.1":"2023-05-02T15:55:18.688Z","4.2.0-beta.1":"2023-05-03T08:10:04.775Z","4.1.2":"2023-05-08T11:36:23.446Z","4.1.2-beta":"2023-05-08T11:41:40.845Z","4.1.2-beta.1":"2023-05-08T14:39:13.203Z","4.1.2-beta.2":"2023-05-09T11:17:43.218Z","4.1.2-beta.3":"2023-05-09T16:41:54.933Z","4.1.2-beta.4":"2023-05-09T17:14:10.709Z","4.1.2-beta.5":"2023-05-09T17:21:13.840Z","4.1.3-beta.1":"2023-05-10T16:51:52.339Z","4.3.0-beta.1":"2023-05-10T16:57:49.597Z","4.3.0-beta.2":"2023-05-11T17:13:25.458Z","4.3.0-beta.3":"2023-05-11T21:52:05.268Z","4.3.0-beta.4":"2023-05-12T13:16:02.988Z","4.2.0":"2023-05-16T09:20:44.294Z","4.3.0":"2023-05-16T10:36:37.363Z","4.4.0":"2023-05-16T14:33:25.830Z","4.4.1":"2023-05-16T14:35:25.077Z","4.5.0":"2023-05-16T14:52:56.868Z","4.5.1-beta.1":"2023-05-17T14:53:21.622Z","4.6.0":"2023-05-17T16:42:58.849Z","4.6.1":"2023-05-17T16:43:28.962Z","4.6.2":"2023-05-19T12:36:08.654Z","4.7.0":"2023-05-19T12:38:44.600Z","4.8.0":"2023-05-22T11:00:09.036Z","4.9.0":"2023-05-22T12:59:01.591Z","4.9.1":"2023-05-25T12:26:12.913Z","4.10.0":"2023-05-25T15:47:28.000Z","4.10.1":"2023-05-25T19:24:22.440Z","4.11.0-alfa.0":"2023-05-26T12:15:06.131Z","4.11.0-alfa.1":"2023-05-27T14:49:56.396Z","4.10.2":"2023-05-30T12:44:56.968Z","4.10.3":"2023-06-01T07:53:08.932Z","4.10.4":"2023-06-01T12:00:18.078Z","4.11.0":"2023-06-05T09:34:21.684Z","4.11.1":"2023-06-06T09:42:25.332Z","4.12.0":"2023-06-07T09:59:51.226Z","4.12.1":"2023-06-13T17:10:32.283Z","4.13.0":"2023-06-14T14:05:19.934Z","4.13.1":"2023-06-14T17:18:00.939Z","4.13.2":"2023-06-19T12:47:19.339Z","4.13.0-beta.0":"2023-06-23T12:01:09.911Z","4.13.0-beta.1":"2023-06-23T12:19:51.838Z","4.13.0-beta.2":"2023-06-23T12:49:36.273Z","4.14.0":"2023-07-04T10:34:41.751Z","4.15.0":"2023-07-04T10:54:44.157Z","4.16.0-beta":"2023-07-11T15:59:34.313Z","4.15.1":"2023-07-12T10:19:38.770Z","4.16.0-beta.0":"2023-07-12T14:38:41.530Z","4.16.0":"2023-07-13T10:36:09.027Z","4.16.1":"2023-07-15T13:37:03.673Z","4.16.0-beta.1":"2023-07-18T11:17:55.229Z","4.16.0-beta.2":"2023-07-18T11:26:34.978Z","4.16.1-beta.0":"2023-07-20T15:36:19.669Z","4.16.2-beta.0":"2023-07-29T14:16:27.496Z","4.17.0":"2023-08-02T15:28:50.289Z","4.18.0":"2023-08-03T08:37:58.319Z","4.18.0-beta.0":"2023-08-03T14:39:21.726Z","4.19.0-beta.0":"2023-08-09T16:26:26.403Z","4.19.0-beta.1":"2023-08-09T16:46:38.711Z","4.19.0-beta.2":"2023-08-21T10:50:26.165Z","4.18.1":"2023-08-22T11:50:48.779Z","4.19.0-beta.3":"2023-08-22T14:58:12.940Z","4.18.2":"2023-08-25T13:01:51.752Z","4.18.3":"2023-08-30T09:03:58.364Z","4.19.1-beta.0":"2023-09-01T09:59:40.267Z","4.18.4":"2023-09-02T13:29:34.174Z","4.18.5":"2023-09-03T03:15:01.786Z","4.19.0-beta.4":"2023-09-05T14:01:03.299Z","4.19.0-beta.5":"2023-09-05T14:14:15.052Z","4.19.0-beta.6":"2023-09-05T14:25:57.108Z","4.19.0-beta.7":"2023-09-07T12:08:38.274Z","4.18.6":"2023-09-07T13:37:31.754Z","4.18.7":"2023-09-07T13:46:47.901Z","4.18.8":"2023-09-07T14:21:24.182Z","4.19.0":"2023-09-08T12:04:23.129Z","4.19.1":"2023-09-11T11:16:59.878Z","4.20.0-beta.0":"2023-09-22T10:07:03.030Z","4.20.0-beta.1":"2023-09-22T13:42:10.611Z","4.1.0-alpha.0":"2023-09-29T10:10:16.699Z","4.2.0-alpha.0":"2023-09-29T12:49:20.393Z","4.10.0-alpha.0":"2023-10-02T11:20:03.563Z","4.20.0":"2023-10-02T16:29:15.210Z","4.21.0-beta.0":"2023-10-04T14:22:44.805Z","4.20.0-beta.2":"2023-10-05T12:01:37.688Z","4.20.0-beta.3":"2023-10-05T14:51:48.629Z","4.20.0-alpha.0":"2023-10-16T09:18:00.747Z","4.20.0-alpha.1":"2023-10-19T13:48:20.141Z","4.20.1":"2023-10-24T16:44:27.194Z","4.21.0-beta.1":"2023-10-27T11:02:32.609Z","4.21.0":"2023-10-30T13:09:47.022Z","4.21.1":"2023-10-30T16:45:13.712Z","4.21.2":"2023-10-30T19:05:10.323Z","4.21.3":"2023-11-01T19:37:14.826Z","4.21.4":"2023-11-01T19:46:46.842Z","4.21.5":"2023-11-01T19:55:45.946Z","4.21.6":"2023-11-01T20:28:13.784Z","4.21.7":"2023-11-02T17:14:29.504Z","4.21.8":"2023-11-02T18:20:13.670Z","4.21.9":"2023-11-06T10:40:48.992Z","5.0.0-beta.0":"2023-11-06T15:24:37.785Z","5.0.0-beta.1":"2023-11-06T19:12:04.103Z","5.0.0-beta.2":"2023-11-08T15:13:33.252Z","4.21.10":"2023-11-08T20:26:21.466Z","5.0.0-beta.3":"2023-11-08T22:38:50.238Z","5.0.0-beta.4":"2023-11-08T23:05:33.485Z","5.0.0-beta.5":"2023-11-08T23:25:55.307Z","4.22.0":"2023-11-09T13:30:01.924Z","5.0.0-beta.6":"2023-11-13T00:07:06.981Z","5.0.0-beta.7":"2023-11-13T12:50:42.363Z","4.23.0":"2023-11-13T15:46:08.438Z","4.23.1":"2023-11-13T16:12:19.942Z","5.0.0-beta.8":"2023-11-13T19:40:59.278Z","5.0.0-beta.9":"2023-11-13T20:07:29.004Z","5.0.0-beta.10":"2023-11-15T18:11:02.775Z","4.23.2":"2023-11-16T09:41:53.377Z","4.23.3":"2023-11-16T14:43:29.811Z","4.23.4":"2023-11-16T15:01:53.756Z","4.23.5":"2023-11-16T15:07:37.109Z","5.0.0-beta.11":"2023-11-17T08:34:55.603Z","5.0.0-beta.12":"2023-11-17T11:29:58.656Z","5.0.0-beta.13":"2023-11-20T16:01:14.557Z","5.0.0-beta.14":"2023-11-20T16:23:01.346Z","5.0.0-beta.15":"2023-11-21T14:10:30.680Z","5.0.0-beta.16":"2023-11-21T15:28:22.961Z","5.0.0-beta.17":"2023-11-22T18:30:24.207Z","5.0.0-beta.18":"2023-11-22T18:49:06.493Z","5.0.0-beta.19":"2023-11-23T20:03:44.447Z","5.0.0-beta.20":"2023-11-23T20:45:24.730Z","5.0.0-beta.21":"2023-11-24T09:56:32.868Z","5.0.0-beta.22":"2023-12-01T13:05:59.011Z","5.0.0-beta.23":"2023-12-02T19:44:46.271Z","5.0.0-beta.24":"2023-12-04T11:30:38.799Z","5.0.0-beta.25":"2023-12-05T14:22:25.041Z","5.0.0-beta.26":"2023-12-07T20:50:35.145Z","4.23.6":"2023-12-08T11:59:20.166Z","5.0.0-beta.27":"2023-12-08T12:48:40.863Z","5.0.0-beta.28":"2023-12-12T08:35:17.856Z","5.0.0-beta.29":"2023-12-12T08:44:44.033Z","5.0.0-beta.30":"2023-12-12T09:15:49.601Z","5.0.0-beta.31":"2023-12-12T09:53:57.977Z","5.0.0-beta.32":"2023-12-12T13:07:31.017Z","5.0.0-beta.33":"2023-12-12T16:44:52.425Z","5.0.0-beta.34":"2023-12-12T16:58:10.099Z","4.20.0-alpha.2":"2023-12-15T12:12:01.911Z","4.20.0-alpha.3":"2023-12-18T15:50:15.508Z","5.0.0-beta.35":"2023-12-20T15:34:31.367Z","4.20.0-alpha.4":"2023-12-20T18:05:09.935Z","5.0.0-beta.36":"2023-12-21T17:30:11.730Z","5.0.0-beta.37":"2023-12-21T17:58:00.419Z","5.0.0-beta.38":"2023-12-21T18:28:38.065Z","5.0.0-beta.39":"2023-12-22T16:38:42.000Z","5.0.0-beta.40":"2024-01-09T12:54:31.806Z","4.23.7":"2024-01-09T16:44:23.300Z","4.23.8":"2024-01-09T18:18:36.872Z","4.20.0-alpha.5":"2024-01-11T12:48:26.510Z","5.0.0-beta.41":"2024-01-11T20:09:32.571Z","5.0.0-beta.42":"2024-01-12T10:24:49.294Z","5.0.0-beta.43":"2024-01-12T10:44:07.803Z","5.0.0-beta.44":"2024-01-12T12:16:33.733Z","5.0.0-beta.45":"2024-01-12T17:57:58.129Z","5.0.0-beta.46":"2024-01-15T12:39:07.576Z","5.0.0-beta.47":"2024-01-15T12:41:18.429Z","5.0.0-beta.48":"2024-01-17T18:04:38.443Z","5.0.0-beta.49":"2024-01-19T13:25:14.332Z","5.0.0-beta.50":"2024-01-19T17:18:08.341Z","5.0.0-beta.51":"2024-01-22T10:54:22.719Z","5.0.0-beta.52":"2024-01-22T14:15:55.725Z","5.0.0-beta.53":"2024-01-22T16:10:16.752Z","5.0.0-beta.54":"2024-01-25T15:18:38.822Z","5.0.0-beta.55":"2024-02-05T15:13:04.113Z","5.0.0-beta.56":"2024-02-05T16:03:58.116Z","5.0.0-beta.57":"2024-02-07T14:07:37.857Z","5.0.0-alhpa.1":"2024-02-09T11:45:51.391Z","5.0.0-alpha.1":"2024-02-09T11:46:39.666Z","5.0.0-beta.58":"2024-02-09T11:48:38.004Z","5.0.0-beta.59":"2024-02-09T18:18:58.255Z","5.0.0-beta.60":"2024-02-12T11:55:04.697Z","5.0.0-beta.61":"2024-02-14T07:45:38.257Z","5.0.0-beta.62":"2024-02-14T10:11:21.507Z","5.0.0-beta.63":"2024-02-15T12:45:04.065Z","5.0.0-beta.64":"2024-02-16T11:19:18.171Z","5.0.0-beta.65":"2024-02-16T11:56:05.267Z","5.0.0-beta.66":"2024-02-16T19:19:41.649Z","5.0.0-beta.67":"2024-02-19T15:35:42.892Z","5.0.0-beta.68":"2024-02-19T16:08:57.594Z","5.0.0-beta.69":"2024-02-20T13:37:15.497Z","5.0.0-beta.70":"2024-02-21T12:38:17.006Z","5.0.0-beta.71":"2024-02-21T14:07:38.288Z","5.0.0-beta.72":"2024-02-22T11:00:47.134Z","4.23.9":"2024-02-22T15:33:16.118Z","4.23.10":"2024-02-22T15:39:14.373Z","5.0.0":"2024-02-22T15:43:58.492Z","5.0.1":"2024-02-28T17:12:14.685Z","5.1.0-beta.0":"2024-02-29T21:22:28.008Z","5.0.2":"2024-03-06T10:52:29.911Z","5.1.0-beta.1":"2024-03-06T12:51:22.248Z","5.0.3":"2024-03-07T15:49:33.389Z","5.0.0-alpha.2":"2024-03-08T11:16:26.487Z","5.1.0-beta.2":"2024-03-26T08:14:19.410Z","5.1.0-beta.3":"2024-03-27T12:32:51.975Z","5.1.0":"2024-03-29T12:44:11.990Z","5.1.1":"2024-04-03T11:15:24.155Z","5.2.0":"2024-04-10T10:44:08.051Z","5.2.0-beta.1":"2024-04-15T14:19:22.138Z","5.2.0-beta.2":"2024-04-15T16:07:50.292Z","5.2.0-alpha.0":"2024-04-16T12:10:41.352Z","5.2.0-alpha.1":"2024-04-17T15:02:33.539Z","5.3.0":"2024-04-19T13:34:48.482Z","5.2.0-alpha.2":"2024-04-26T08:56:21.296Z","5.2.0-alpha.3":"2024-04-26T09:07:05.741Z","5.4.0-beta.1":"2024-04-30T11:38:13.740Z","5.4.0-beta.2":"2024-04-30T15:13:46.653Z","5.2.0-alpha.4":"2024-05-03T12:19:06.527Z","5.2.0-alpha.5":"2024-05-05T13:21:31.574Z","5.2.0-alpha.6":"2024-05-05T13:33:26.023Z","5.2.0-alpha.7":"2024-05-05T17:22:36.468Z","5.2.0-alpha.8":"2024-05-05T17:47:00.818Z","5.2.0-alpha.9":"2024-05-05T18:03:54.574Z","5.2.0-alpha.10":"2024-05-05T18:09:34.677Z","5.2.0-alpha.11":"2024-05-05T19:03:58.737Z","5.4.0-beta.3":"2024-05-06T08:04:49.548Z","5.4.0-beta.4":"2024-05-07T06:57:08.977Z","5.4.0-beta.5":"2024-05-10T07:29:55.453Z","5.4.0-beta.6":"2024-05-10T12:18:27.418Z","5.4.0-alpha.0":"2024-05-16T08:56:28.332Z","5.4.0-alpha.1":"2024-05-16T09:52:50.331Z","5.4.0-alfa.2":"2024-05-16T10:35:48.906Z","5.4.0-alfa.3":"2024-05-16T10:38:02.692Z","5.4.0-alpha.2":"2024-05-16T12:19:47.020Z","5.4.0-alpha.3":"2024-05-16T13:35:22.030Z","5.4.0-alpha.4":"2024-05-16T13:49:58.918Z","5.4.0-alpha.5":"2024-05-16T14:13:17.409Z","5.4.0-alpha.6":"2024-05-16T14:45:35.910Z","5.4.0-alpha.7":"2024-05-16T15:08:58.135Z","5.4.0-alpha.8":"2024-05-16T15:39:13.187Z","5.4.0-alpha.9":"2024-05-16T16:16:46.522Z","5.4.0-alpha.10":"2024-05-16T16:24:36.111Z","5.4.1-beta.1":"2024-05-17T06:53:06.049Z","5.4.1-alpha.1":"2024-05-17T07:22:45.299Z","5.4.1-beta.2":"2024-05-22T17:54:33.961Z","5.4.1-beta.3":"2024-05-23T09:05:19.881Z","5.4.1":"2024-05-23T12:28:46.822Z","5.4.2":"2024-05-23T15:30:36.083Z","5.5.0":"2024-05-24T11:36:05.916Z","5.6.0":"2024-05-24T12:54:48.288Z","5.6.1":"2024-05-24T15:47:15.228Z","5.6.2":"2024-05-27T14:24:45.660Z","5.6.3":"2024-05-27T21:10:22.332Z","5.6.4-beta.1":"2024-05-29T06:56:25.337Z","5.6.3-beta.2":"2024-05-29T12:17:09.911Z","5.7.1":"2024-05-29T13:45:59.534Z","5.8.0-beta.1":"2024-06-02T19:27:41.190Z","5.8.0-beta.2":"2024-06-03T16:17:33.129Z","5.8.0-beta.4":"2024-06-04T15:08:32.510Z","5.8.0":"2024-06-06T09:10:45.732Z","5.8.1":"2024-06-06T09:58:46.052Z","5.8.2":"2024-06-06T11:22:14.379Z","5.9.0":"2024-06-10T14:11:06.776Z","5.10.0":"2024-06-12T15:51:14.358Z","5.4.0-alpha.11":"2024-06-13T11:20:40.643Z","5.11.0":"2024-06-13T14:26:21.120Z","5.12.0-beta.0":"2024-06-14T15:20:22.297Z","5.12.0-beta.1":"2024-06-17T12:14:34.449Z","5.12.0-beta.2":"2024-06-17T13:36:21.383Z","5.12.0-beta.3":"2024-06-17T14:32:03.854Z","5.12.0-beta.4":"2024-06-17T15:32:02.705Z","5.12.0-beta.5":"2024-06-17T16:20:34.132Z","5.12.0-beta.6":"2024-06-17T16:26:09.581Z","5.12.0-beta.7":"2024-06-19T12:23:40.161Z","5.12.0":"2024-06-19T13:05:22.415Z","5.12.1":"2024-06-19T13:44:14.853Z","5.12.2":"2024-06-25T16:02:45.826Z","5.12.3":"2024-06-26T08:19:32.983Z","5.12.4":"2024-06-26T10:01:50.447Z","5.12.5":"2024-06-27T10:32:03.106Z","5.13.0":"2024-06-27T11:44:59.573Z"},"maintainers":[{"name":"akord-service","email":"dev@akord.com"},{"name":"kgracki","email":"kacpergracki@gmail.com"},{"name":"katala","email":"alexey.katalkin@gmail.com"},{"name":"wkolod","email":"weronika.kolodziejak@gmail.com"},{"name":"jarrvis","email":"michal.kaliszewski@pl.bosch.com"}],"author":{"name":"Akord Team"},"repository":{"type":"git","url":"git+ssh://git@github.com/Akord-com/akord-js.git"},"keywords":["akord","storage","web3","encryption","e2ee"],"license":"MIT","homepage":"https://github.com/Akord-com/akord-js#readme","bugs":{"url":"https://github.com/Akord-com/akord-js/issues"},"readme":"# akord-js\n\nAkord Client - a set of core js functions to interact with [Akord](https://docs.akord.com/).\\\nThis package can be used in both browser and Node.js environments.\n\n- [Usage](#usage)\n  - [Import](#import)\n  - [Quick Start](#quick-start)\n  - [Plugins](#plugins)\n  - [Examples](#examples)\n- [Modules](#modules)\n  - [Auth](#authentication)\n  - [Vault](#vault)\n  - [Membership](#membership)\n  - [Memo](#memo)\n  - [Stack](#stack)\n  - [Folder](#folder)\n  - [Note](#note)\n  - [Manifest](#manifest)\n  - [NFT](#nft)\n  - [Collection](#collection)\n  - [Contract](#contract)\n  - [Profile](#profile)\n  - [Batch](#batch)\n  - [Zip](#zip)\n  - [Storage](#storage)\n- [Development](#development)\n- [Deployment](#deployment)\n\n## Usage\n> requires Node.js >= 18\n\n### Import\n```js\nimport { Akord } from \"@akord/akord-js\";\n```\nor\n```js\nconst { Akord } = require(\"@akord/akord-js\");\n```\n\n### Quick start\n\n#### Init Akord\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nconst { wallet } = await Auth.signIn(email, password);\nconst akord = new Akord(wallet);\n```\n\n#### Create vault\n```js\nconst { vaultId } = await akord.vault.create(\"my first vault\");\n```\n\n#### Upload file to the vault by creating new stack\n```js\nconst { stackId, uri } = await akord.stack.create(vaultId, file);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n#### Download latest file version of the stack\n```js\nconst { data: fileBuffer, name: fileName } = await akord.stack.getVersion(stackId);\n```\n\n#### Query user vaults\n```js\nconst vaults = await akord.vault.listAll();\n```\n\n#### Plugins\n\nSome methods require plugins installation. \nThis design is motivated by bundle size care: increase the package bundle size only if feature is used.\nOfficial supported plugins can be found at: [plugins](plugins)\n```javascript \nimport { PubSubPlugin } from \"@akord/akord-js-pubsub-plugin\"\nimport { Akord, Auth } from \"@akord/akord-js\";\n\nconst { wallet } = await Auth.signIn('your_username', 'your_password');\nconst akord = new Akord(wallet, { plugins: [new PubSubPlugin()] });\n```\n\n\n### Examples\n- See our [demo app tutorial](https://js.akord.com) and learn how to create,\ncontribute and access an Akord Vault from.\n\n- See example flows under [tests](src/__tests__).\n\n- See different setups under [examples](examples).\n\n## Authentication\nUse `Auth` module to handle authentication.\n\n```js\nimport { Auth } from \"@akord/akord-js\";\n```\n\n- By default `Auth` is using SRP authentication\n- `Auth` stores tokens in `Storage` implementation \n- `Storage` defaults to localStorage on web & memoryStorage on nodeJs\n- `Storage` implementation can be configured with `Auth.configure({ storage: window.sessionStorage })`\n- `Auth` is automatically refreshing tokens in SRP mode\n- On server side it is recommended to use API keys: `Auth.configure({ apiKey: 'your_api_key' })`\n- API key: can be generated over web app & over CLI\n\n##### use short living token with refresh\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ storage: window.sessionStorage }); // optionally - configure tokens store\n```\n##### use API key\n```js\nimport { Auth } from \"@akord/akord-js\";\nAuth.configure({ apiKey: \"api_key\" });\n```\n##### use self-managed auth token\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nAuth.configure({ authToken: \"auth_token\" });\n```\n\n#### `signIn(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- returns `Promise<{ wallet, jwt }>` - Promise with JWT token & Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signIn(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `signUp(email, password)`\n\n- `email` (`string`, required)\n- `password` (`string`, required)\n- `clientMetadata` (`any`, optional) - JSON client metadata, ex: { clientType: \"CLI\" }\n- returns `Promise<{ wallet }>` - Promise with Akord Wallet\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { wallet } = await Auth.signUp(\"winston@gmail.com\", \"1984\");\n```\n</details>\n\n#### `verifyAccount(email, code)`\n\n- `email` (`string`, required)\n- `code` (`string`, required)\n- returns `Promise<void>`\n\n<details>\n  <summary>example</summary>\n\n```js\nawait Auth.verifyAccount(\"winston@gmail.com\", 123456);\n```\n</details>\n\n\n## Modules\n\n### vault\n\n#### `create(name, options)`\n\n- `name` (`string`, required) - new vault name\n- `options` (`VaultCreateOptions`, optional) - public/private, terms of access, etc.\n- returns `Promise<{ vaultId, membershipId, transactionId }>` - Promise with new vault id, owner membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a private vault\nconst { vaultId, membershipId } = await akord.vault.create(\"my first private vault\");\n\n// create a public vault with terms of access\nconst { vaultId, membershipId } = await akord.vault.create(\n  \"my first public vault\",\n  { public: true, termsOfAccess: \"terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault\" }\n);\n\n// create a public vault with description & tags for easier lookup\nconst { vaultId, membershipId } = await akord.vault.create(\"Arty podcast\", {\n    public: true,\n    description: \"A permanent podcast dedicated to art history\",\n    tags: [\"art\", \"podcast\", \"archive\"]\n  });\n\n// create a cloud storage vault \nconst { vaultId, membershipId } = await akord.vault.create(\"Non permanent stuff\", {\n    cloud: true\n  });\n```\n</details>\n\n#### `update(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` (`VaultUpdateOptions`, required) - name, description & tags\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.update(vaultId, {\n  name: \"color palette\",\n  description: \"color inspiration for design and art projects\",\n  tags: [\"taupe\", \"burgundy\", \"mauve\"]\n});\n```\n</details>\n\n#### `rename(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - new vault name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.rename(vaultId, \"updated name\");\n```\n</details>\n\n#### `addTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be added\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.addTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `removeTags(vaultId, tags)`\n\n- `vaultId` (`string`, required)\n- `tags` (`string[]`, required) - tags to be removed\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.removeTags(vaultId, [\"taupe\", \"burgundy\"]);\n```\n</details>\n\n#### `archive(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.archive(vaultId);\n```\n</details>\n\n#### `restore(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.restore(vaultId);\n```\n</details>\n\n#### `delete(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.vault.delete(vaultId);\n```\n</details>\n\n#### `get(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`VaultGetOptions`][vault-get-options], optional)\n- returns `Promise<Vault>` - Promise with the vault object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vault = await akord.vault.get(vaultId);\n```\n</details>\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Vault>>` - Promise with currently authenticated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\nconst vaults = await akord.vault.listAll();\n```\n</details>\n\n#### `list(listOptions)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated user vaults\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 user vaults\nconst { items } = await akord.vault.list();\n\n// retrieve first 20 user vaults\nconst { items } = await akord.vault.list({ limit: 20 });\n\n// iterate through all user vaults\nlet token = null;\nlet vaults = [];\ndo {\n  const { items, nextToken } = await akord.vault.list({ nextToken: token });\n  vaults = vaults.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### membership\n\n#### `invite(vaultId, email, role)`\n\nInvite user with an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ membershipId, transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.invite(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `inviteNewUser(vaultId, email, role)`\n\nInvite user without an Akord account\n\n- `vaultId` (`string`, required)\n- `email` (`string`, required) - invitee's email\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<{ transactionId }>` - Promise with new membership id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { membershipId } = await akord.membership.inviteNewUser(vaultId, \"winston@gmail.com\", \"VIEWER\");\n```\n</details>\n\n#### `airdrop(vaultId, members)`\n\nAirdrop access to the vault to the batch of public keys. New members can access/contribute the vault using their private/public key pair. \\\nNOTE: If the new members are contributors, what they contribute is under the domain of the vault owner.\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord, Auth } from \"@akord/akord-js\";\nimport { AkordWallet } from \"@akord/crypto\";\n\nconst wallet1 = await AkordWallet.create();\nconst wallet2 = await AkordWallet.create();\nconst wallet3 = await AkordWallet.create();\nconst wallet4 = await AkordWallet.create();\n\nconst tomorrowSameHour = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);\nconst inOneMinute = new Date(new Date().getTime() + 60 * 1000);\n\nawait akord.membership.airdrop(vaultId, [\n   { \n    publicSigningKey: wallet1.signingPublicKey(), \n    publicKey: wallet1.publicKey(), \n    role: \"VIEWER\", // view only access to vault\n    options: {\n      expirationDate: tomorrowSameHour // access valid for 24 hours\n    }\n   },\n   { \n    publicSigningKey: wallet2.signingPublicKey(), \n    publicKey: wallet2.publicKey(), \n    role: \"CONTRIBUTOR\", // can edit / add / delete\n    options: {\n      expirationDate: inOneMinute, // access valid for 1 minute\n      allowedStorage: 10 // can use up to 10Mb from host account\n    }\n   },\n   { \n    publicSigningKey: wallet3.signingPublicKey(), \n    publicKey: wallet3.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      expirationDate: null, // valid until manual revoke\n      allowedStorage: 0 // can't upload (but can edit e.g. move, rename)\n    }\n   },\n   { \n    publicSigningKey: wallet4.signingPublicKey(), \n    publicKey: wallet4.publicKey(), \n    role: \"CONTRIBUTOR\",\n    options: {\n      allowedStorage: null // can upload using full storage balance of the host\n    }\n   }\n]);\n\n// access the vault as user 1\nawait Auth.signInWithWallet(wallet1);\nconst akord1 = new Akord(wallet1);\nconsole.log(await akord1.vault.get(vaultId));\n\n// access the vault as user 2\nawait Auth.signInWithWallet(wallet2);\nconst akord2 = new Akord(wallet2);\nconsole.log(await akord2.vault.get(vaultId));\n```\n</details>\n\n#### `accept(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.accept(membershipId);\n```\n</details>\n\n#### `confirm(membershipId)`\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.confirm(membershipId);\n```\n</details>\n\n#### `reject(membershipId)`\n\nReject pending invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.reject(membershipId);\n```\n</details>\n\n#### `leave(membershipId)`\n\nReject already accepted invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.leave(membershipId);\n```\n</details>\n\n#### `revoke(membershipId)`\n\nRevoke a membership, update also each valid membership with new rotated keys\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.revoke(membershipId);\n```\n</details>\n\n#### `changeRole(membershipId, role)`\n\n- `membershipId` (`string`, required)\n- `role` ([`RoleType`][role-type], required) - VIEWER/CONTRIBUTOR/OWNER\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.changeRole(membershipId, \"CONTRIBUTOR\");\n```\n</details>\n\n#### `inviteResend(membershipId)`\n\nResend email invitation\n\n- `membershipId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.membership.inviteResend(membershipId);\n```\n</details>\n\n#### `get(membershipId, options)`\n\n- `membershipId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Membership>` - Promise with the membership object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst membership = await akord.membership.get(membershipId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Membership>>` - Promise with all memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memberships = await akord.membership.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memberships within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memberships for the vault\nconst { items } = await akord.membership.list(vaultId);\n\n// retrieve first 20 memberships for the vault\nconst { items } = await akord.membership.list(vaultId, { limit: 20 });\n\n// iterate through all memberships\nlet token = null;\nlet memberships = [];\ndo {\n  const { items, nextToken } = await akord.membership.list(vaultId, { nextToken: token });\n  memberships = memberships.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### memo\n\n#### `create(vaultId, message)`\n\n- `vaultId` (`string`, required)\n- `message` (`string`, required) - memo content\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ memoId, transactionId }>` - Promise with new memo id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { memoId } = await akord.memo.create(vaultId, \"Suspendisse ut lorem vitae lectus faucibus lacinia\");\n```\n</details>\n\n#### `addReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.addReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `removeReaction(memoId, reaction)`\n\n- `memoId` (`string`, required)\n- `reaction` (`reactionEmoji`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nimport { Akord } from \"@akord/akord-js\"\n// valid values: [JOY, ASTONISHED, CRY, HEART, FIRE, THUMBS_UP, THUMBS_DOWN, PRAY]\nconst { transactionId } = await akord.memo.removeReaction(memoId, Akord.reactionEmoji.FIRE);\n```\n</details>\n\n#### `get(memoId, options)`\n\n- `memoId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Memo>` - Promise with the memo object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memo = await akord.memo.get(memoId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Memo>>` - Promise with all memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst memos = await akord.memo.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated memos within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 memos for the vault\nconst { items } = await akord.memo.list(vaultId);\n\n// retrieve first 20 memos for the vault\nconst { items } = await akord.memo.list(vaultId, { limit: 20 });\n\n// iterate through all memos\nlet token = null;\nlet memos = [];\ndo {\n  const { items, nextToken } = await akord.memo.list(vaultId, { nextToken: token });\n  memos = memos.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### stack\n\n#### `create(vaultId, file, name)`\n\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `name` (`string`, required) - stack name\n- `options` (`StackCreateOptions`, optional)\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create a stack from file path with custom arweave tags\nconst { stackId, uri } = await akord.stack.create(vaultId, \"path to your file\", {\n   arweaveTags: [\n      { name: \"Type\", value: \"music\" },\n      { name: \"Genre\", value: \"rock\" },\n      { name: \"Genre\", value: \"new wave\" }\n   ]\n});\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your file on ViewBlock by visiting the following URL: https://viewblock.io/arweave/tx/{uri}\n```\n\n```js\nimport { UDL_LICENSE_TX_ID } from \"@akord/akord-js\";\n\n// create a file stack with UDL\n\n// first let's define terms of UDL\nconst udl = {\n  license: UDL_LICENSE_TX_ID,\n  licenseFee: {\n    type: \"Monthly\",\n    value: 5\n  },\n  derivations: [\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 30,\n    },\n    {\n      type: \"Allowed-With-RevenueShare\",\n      value: 10,\n      duration: {\n        type: \"After\",\n        value: 2\n      }\n    }\n  ],\n  commercialUses: [{ type: \"Allowed-With-Credit\" }],\n  paymentAddress: \"89tR0-C1m3_sCWCoVCChg4gFYKdiH5_ZDyZpdJ2DDRw\"\n};\n// then pass it as an option when creating the file stack\nconst { stackId } = await akord.stack.create(vaultId, file, { udl: udl });\n```\n> [See Next.js file upload showcase here][file-upload-example]\n</details>\n\n#### `import(vaultId, fileTxId)`\n\nCreate new stack from an existing arweave file transaction\n\n- `vaultId` (`string`, required)\n- `fileTxId` (`string`, required) - arweave file transaction id reference\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ stackId, transactionId }>` - Promise with new stack id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { stackId } = await akord.stack.import(vaultId, \"kzGxbFW_oJ3PyYneRs9cPrChQ-k-8Fym5k9PCZNJ_HA\");\n```\n</details>\n\n#### `rename(stackId, name)`\n\n- `stackId` (`string`, required)\n- `name` (`string`, required) - new stack name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.rename(stackId, \"new name for your stack\");\n```\n</details>\n\n#### `uploadRevision(stackId, file)`\n\n- `stackId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`FileUploadOptions`, optional)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.uploadRevision(stackId, \"path to your file\");\n```\n</details>\n\n#### `revoke(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.revoke(stackId);\n```\n</details>\n\n#### `move(stackId, parentId)`\n\n- `stackId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the stack to newly created folder\nconst { transactionId } = await akord.stack.move(stackId, folderId);\n```\n</details>\n\n#### `restore(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.restore(stackId);\n```\n</details>\n\n#### `delete(stackId)`\n\n- `stackId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.stack.delete(stackId);\n```\n</details>\n\n#### `get(stackId, options)`\n\n- `stackId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Stack>` - Promise with the stack object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stack = await akord.stack.get(stackId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Stack>>` - Promise with all stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst stacks = await akord.stack.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated stacks within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 stacks for the vault\nconst { items } = await akord.stack.list(vaultId);\n\n// retrieve first 20 stacks for the vault\nconst { items } = await akord.stack.list(vaultId, { limit: 20 });\n\n// iterate through all stacks\nlet token = null;\nlet stacks = [];\ndo {\n  const { items, nextToken } = await akord.stack.list(vaultId, { nextToken: token });\n  stacks = stacks.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(stackId, index)`\n\nGet file stack version by index, return the latest version by default\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<{ name: string, data: ArrayBuffer }>` - Promise with file name & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId);\n\n// get the first stack version\nconst { name: fileName, data: fileBuffer } = await akord.stack.getVersion(stackId, 0);\n```\n</details>\n\n#### `getUri(stackId, type, index)`\n\nGet stack file uri by index, return the latest file uri by default\n\n- `stackId` (`string`, required)\n- `type` (`StorageType`, optional) - storage type, default to arweave\n- `index` (`number`, optional) - file version index, default to latest\n- returns `Promise<string>` - Promise with stack file uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the latest file version\nconst arweaveUri = await akord.stack.getUri(stackId);\n\n// get the arweave uri for the first file version\nconst arweaveUri = await akord.stack.getUri(stackId, 0);\n```\n</details>\n\n#### `download(stackId, index, options)`\n\nDownload stack version by index, return the latest version by default.\nThis method can be used for downloading the binary or previewing it in browser (use options.noSave).\n\n- `stackId` (`string`, required)\n- `index` (`number`, optional) - file version index, default to latest\n- `options` (`FileDownloadOptions`], optional) - control download behavior\n- returns `Promise<string>` - Promise with location of downloaded file\n\n<details>\n  <summary>example</summary>\n\n```js\n    \n  // download the file in browser / on server:\n  await akord.stack.download(stackId, index)\n    \n  // preview the file in browser:\n  const url = await akord.stack.download(stackId, index, { skipSave: true })\n       \n  <video src={url} controls />  \n```\n</details>\n\n### folder\n\n#### `create(vaultId, name)`\n\n- `vaultId` (`string`, required)\n- `name` (`string`, required) - folder name\n- `options` (`NodeCreateOptions`, optional) - parent id, etc.\n- returns `Promise<{ folderId, transactionId }>` - Promise with new folder id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { folderId } = await akord.folder.create(vaultId, \"my first folder\");\n```\n</details>\n\n#### `rename(folderId, name)`\n\n- `folderId` (`string`, required)\n- `name` (`string`, required) - new folder name\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.rename(folderId, \"my first folder\");\n```\n</details>\n\n#### `move(folderId, parentId)`\n\nMove the given folder along with its content to a different folder (parent)\n\n- `folderId` (`string`, required)\n- `parentId` (`string`, required) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create root folder\nconst rootFolderId = (await akord.folder.create(vaultId, \"root folder\")).folderId;\n// move the folder to newly created root folder\nconst { transactionId } = await akord.folder.move(folderId, rootFolderId);\n```\n</details>\n\n#### `revoke(folderId)`\n\nRevoke the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.revoke(folderId);\n```\n</details>\n\n#### `restore(folderId)`\n\nRestore the given folder along with the sub-tree of stacks and folders\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.restore(folderId);\n```\n</details>\n\n#### `delete(folderId)`\n\nRemove the folder along with the sub-tree of stacks and folders from the vault\n\n- `folderId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.folder.delete(folderId);\n```\n</details>\n\n#### `get(folderId, options)`\n\n- `folderId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Folder>` - Promise with the folder object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folder = await akord.folder.get(folderId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Folder>>` - Promise with all folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst folders = await akord.folder.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated folders within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 folders for the vault\nconst { items } = await akord.folder.list(vaultId);\n\n// retrieve first 20 folders for the vault\nconst { items } = await akord.folder.list(vaultId, { limit: 20 });\n\n// iterate through all folders\nlet token = null;\nlet folders = [];\ndo {\n  const { items, nextToken } = await akord.folder.list(vaultId, { nextToken: token });\n  folders = folders.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n### note\n\n#### `create(vaultId, content, name)`\n\n- `vaultId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteCreateOptions`, optional) - parent id, mime type, etc.\n- returns `Promise<{ noteId, transactionId }>` - Promise with new note id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { noteId } = await akord.note.create(vaultId, \"# Hello World\", \"Hello World note\");\n\nconst { noteId } = await akord.note.create(\n  vaultId,\n  JSON.stringify({ name: \"My first JSON note\" }),\n  \"My first JSON note\",\n  { parentId: parentId, mimeType: \"application/json\" }\n);\n```\n</details>\n\n#### `uploadRevision(noteId, content, name)`\n\n- `noteId` (`string`, required)\n- `content` (`string`, required) - note text content, ex: stringified JSON\n- `name` (`string`, required) - note name\n- `options` (`NoteOptions`, optional) - mime type, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.uploadRevision(noteId, \"# Hello World bis\", \"Hello World note bis\");\n```\n</details>\n\n#### `move(noteId, parentId)`\n\n- `noteId` (`string`, required)\n- `parentId` (`string`, optional) - new parent folder id\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// create new folder\nconst { folderId } = await akord.folder.create(vaultId, \"new folder\");\n// move the note to newly created folder\nconst { transactionId } = await akord.note.move(noteId, folderId);\n```\n</details>\n\n#### `revoke(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.revoke(noteId);\n```\n</details>\n\n#### `restore(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.restore(noteId);\n```\n</details>\n\n#### `delete(noteId)`\n\n- `noteId` (`string`, required)\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { transactionId } = await akord.note.delete(noteId);\n```\n</details>\n\n#### `get(noteId, options)`\n\n- `noteId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Note>` - Promise with the note object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst note = await akord.note.get(noteId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Note>>` - Promise with all notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst notes = await akord.note.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated notes within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 notes for the vault\nconst { items } = await akord.note.list(vaultId);\n\n// retrieve first 20 notes for the vault\nconst { items } = await akord.note.list(vaultId, { limit: 20 });\n\n// iterate through all notes\nlet token = null;\nlet notes = [];\ndo {\n  const { items, nextToken } = await akord.note.list(vaultId, { nextToken: token });\n  notes = notes.concat(items);\n  token = nextToken;\n} while (token);\n```\n</details>\n\n#### `getVersion(noteId, index)`\n\nGet note text version by index, return the latest version by default\n\n- `noteId` (`string`, required)\n- `index` (`number`, optional) - note version index\n- returns `Promise<{ name: string, data: string }>` - Promise with note name & data string text\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId);\n\n// get the first note version\nconst { name: fileName, data: noteText } = await akord.note.getVersion(noteId, 0);\n```\n</details>\n\n### manifest\n\nManifest is a special case of Stack that is unique per vault and follows [Arweave Path Manifest standard](https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests).\n\n#### `generate(vaultId)`\n\nIf there is no manifest for the vault, a new manifest stack will be created, otherwise a new version of the manifest will be generated and uploaded.\n\nIf no input JSON is provided by the user, manifest will be generated automatically from the current vault/folder state.\n\n- `vaultId` (`string`, required)\n- `options` ([`ManifestOptions`][manifest-options], optional) - parent id, custom index, manually created manifest, etc.\n- returns `Promise<{ transactionId }>` - Promise with corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// generate manifest for the entire vault contents\nconst { uri } = await akord.manifest.generate(vaultId);\nconsole.log(\"Manifest link: https://arweave.net/\" + uri);\n```\n\n```js\n// generate manifest for a specific folder\nconst { uri } = await akord.manifest.generate(vaultId, { parentId: folderId });\nconsole.log(\"Manifest link: https://arweave.net/\" + uri);\n```\n</details>\n\n#### `get(vaultId)`\n\n- `vaultId` (`string`, required)\n- returns `Promise<Stack>` - Promise with the vault manifest object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst manifestNode = await akord.manifest.get(vaultId);\n```\n</details>\n\n#### `getVersion(vaultId, index)`\n\nGet vault manifest version by index, return the latest version by default\n\n- `vaultId` (`string`, required)\n- `index` (`number`, optional) - file version index\n- returns `Promise<JSON>` - Promise with JSON manifest\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the latest vault manifest\nconst manifest = await akord.manifest.getVersion(vaultId);\n\n// get the first version of the vault manifest\nconst manifestV1 = await akord.manifest.getVersion(vaultId, 0);\n```\n</details>\n\n### nft\n\nThe NFT module enables the creation of atomic NFTs compliant with the [Atomic Asset standard](https://atomic-assets.arweave.dev/).\n\nThe atomic asset can be minted with the option to attach the [Universal Data License](https://arwiki.wiki/#/en/Universal-Data-License-How-to-use-it) (UDL), and can be listed on the [Universal Content Marketplace](https://bazar.arweave.dev/) (UCM).\n\n#### `mint(vaultId, asset, metadata, options)`\n\n- `vaultId` (`string`, required)\n- `asset` ([`FileSource`][file-source], required) - asset data\n- `metadata` (`NFTMetadata`, required) - NFT metadata: name, ticker, description, owner, creator, etc.\n- `options` (`NFTMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ nftId, transactionId, uri }>` - Promise with new nft id & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// Mint an atomic NFT with the UDL attached\n\n// First, let's define our NFT metadata\nconst nftMetadata = {\n  name: \"Golden Orchid - Flora Fantasy #1\",\n  creator: \"VALID_ARWEAVE_ADDRESS\",\n  owner: \"VALID_ARWEAVE_ADDRESS\",\n  collection: \"Flora Fantasy\",\n  description: \"A rare digital representation of the mythical Golden Orchid\",\n  types: [\"image\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the NFT by passing the path to the asset data, NFT metadata, and UDL terms\nconst { uri } = await akord.nft.mint(vaultId, \"./your-nft.jpeg\", nftMetadata, { udl: udlTerms });\n\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can access your NFT on ViewBlock by visiting the following URL:\n// https://viewblock.io/arweave/tx/{uri}\n```\n</details>\n\n#### `get(nftId, options)`\n\n- `nftId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<NFT>` - Promise with the nft object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nft = await akord.nft.get(nftId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<NFT>>` - Promise with all nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst nfts = await akord.nft.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated nfts within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 nfts for the vault\nconst { items } = await akord.nft.list(vaultId);\n\n// retrieve first 20 nfts for the vault\nconst { items } = await akord.nft.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getAsset(nftId)`\n\nGet nft asset\n\n- `nftId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with nft asset object & data buffer\n\n<details>\n  <summary>example</summary>\n\n```js\n// get nft data buffer\nconst { data: fileBuffer } = await akord.nft.getAsset(nftId);\n```\n</details>\n\n#### `getUri(nftId, type)`\n\nGet nft asset uri\n\n- `nftId` (`string`, required)\n- `type` ([`StorageType`][storage-type], optional) - storage type, default to arweave\n- returns `Promise<string>` - Promise with nft asset uri\n\n<details>\n  <summary>example</summary>\n\n```js\n// get the arweave uri for the nft asset\nconst arweaveUri = await akord.nft.getUri(nftId);\n```\n</details>\n\n### collection\n\nThe collection module enables the creation of a collection of [NFTs](#nft) compliant with the [Collection protocol](https://specs.g8way.io/?tx=4zqtz8-U4LNKjFU4gZ28oKkV6bTlfzJiguqjbMl9R4Q).\n\n#### `mint(vaultId, asset, metadata, options)`\n\nNOTE: each NFT will inherit collection metadata setup\n\n- `vaultId` (`string`, required)\n- `items` (`{asset:FileSource,metadata:NFTMetadata,options:NFTMintOptions}[]`, required) - items to mint\n- `metadata` (`CollectionMetadata`, required) - Collection metadata: name, ticker, description, owner, creator, etc.\n- `options` (`CollectionMintOptions`, optional) - ex: UDL terms\n- returns `Promise<{ collectionId, transactionId, items }>` - Promise with new collection id, minted NFTs & corresponding transaction id\n\n<details>\n  <summary>example</summary>\n\n```js\n// First, let's define our Collection metadata\nconst collectionMetadata = {\n  name: \"Flora Fantasy\",\n  creator: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  owner: \"VALID_ARWEAVE_ADDRESS\", // should be a valid Arweave address\n  description: \"Discover the enchanting world of Flora Fantasy, where nature meets fantasy in mesmerizing digital artworks\",\n  types: [\"image\", \"collection\"],\n  topics: [\"floral\", \"nature\"]\n};\n\n// Then, let's define UDL terms for the whole collection\nconst udlTerms = {\n  licenseFee: {\n    type: \"One-Time\",\n    value: 10\n  },\n  derivations: [{ type: \"Allowed-With-Credit\" }]\n};\n\n// Finally, let's mint the collection & list it on UCM\nconst { uri, items } = await akord.collection.mint(\n  vaultId,\n  [{ asset: file, metadata: { name: \"Golden Orchid #1\" } }],\n  collectionMetadata,\n  { udl: udl, ucm: true }\n);\n// Once the transaction is accepted on Arweave network (it takes 5-15 minutes on average),\n// you can view your collection on BazAR by visiting the following URL:\n// https://bazar.arweave.dev/#/collection/{uri}\n```\n</details>\n\n#### `get(collectionId, options)`\n\n- `collectionId` (`string`, required)\n- `options` ([`GetOptions`][get-options], optional)\n- returns `Promise<Collection>` - Promise with the collection object\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collection = await akord.collection.get(collectionId);\n```\n</details>\n\n#### `listAll(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<Collection>>` - Promise with all collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\nconst collections = await akord.collection.listAll(vaultId);\n```\n</details>\n\n#### `list(vaultId, options)`\n\n- `vaultId` (`string`, required)\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated collections within given vault\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 collections for the vault\nconst { items } = await akord.collection.list(vaultId);\n\n// retrieve first 20 collections for the vault\nconst { items } = await akord.collection.list(vaultId, { limit: 20 });\n```\n</details>\n\n#### `getBanner(collectionId)`\n\nGet collection banner\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection banner\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection banner buffer\nconst { data: fileBuffer } = await akord.collection.getBanner(collectionId);\n```\n</details>\n\n#### `getThumbnail(collectionId)`\n\nGet collection thumbnail\n\n- `collectionId` (`string`, required)\n- returns `Promise<{ data: ArrayBuffer } & FileVersion>` - Promise with collection thumbnail\n\n<details>\n  <summary>example</summary>\n\n```js\n// get collection thumbnail buffer\nconst { data: fileBuffer } = await akord.collection.getThumbnail(collectionId);\n```\n</details>\n\n### contract\n\n#### `getState()`\n\n- `id` (`string`, required) - vault contract id\n- returns `Promise<Contract>` - Promise with the current contract state\n\n<details>\n  <summary>example</summary>\n\n```js\nconst currentState = await akord.contract.getState(vaultId);\n```\n</details>\n\n### profile\n\n#### `get()`\n\nFetch currently authenticated user's profile details\n\n- returns `Promise<ProfileDetails>` - Promise with profile details\n\n#### `update(name, avatar)`\n\nUpdate user profile along with all active memberships\n\n- `name` (`string`, required) - new profile name\n- `avatar` (`ArrayBuffer`, required) - new avatar buffer\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n### batch\n\n#### `revoke(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `restore(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `delete(items)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `move(items, parentId)`\n\n- `items` (`Array<{ id: string, type: `[`NodeType`][node-type]` }>`, required)\n- `parentId` (`string`, optional)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `membershipChangeRole(items)`\n\n- `items` (`Array<{ id: string, role: `[`RoleType`][role-type]` }>`, required)\n- returns `Promise<Array<{ transactionId }>>` - Promise with corresponding transaction ids\n\n#### `stackCreate(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ file: `[`FileSource`][file-source]`, name: string, options: StackCreateOptions>`, required)\n- `options` (`BatchStackCreateOptions`, optional)\n- returns `Promise<`[`BatchStackCreateResponse`][batch-stack-create-response]`>` - Promise with new stack ids & their corresponding transaction ids\n\n#### `membershipInvite(vaultId, items)`\n\n- `vaultId` (`string`, required)\n- `items` (`Array<{ email: string, role: `[`RoleType`][role-type]` }>`, required)\n- `options` (`MembershipCreateOptions`, optional) - invitation email message, etc.\n- returns `Promise<`[`BatchMembershipInviteResponse`][batch-membership-invite-response]`>` - Promise with new membership ids & their corresponding transaction ids\n\n### zip\n\n#### `list(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<{ items, nextToken }>` - Promise with paginated zips uploaded by user\n\n<details>\n  <summary>example</summary>\n\n```js\n// retrieve first 100 zips for given user\nconst { items } = await akord.zip.list();\n\n// retrieve first 20 zips for given user\nconst { items, nextToken } = await akord.zip.list({ limit: 20 });\n// retrieve next 10 zips for given user\nconst { items } = await akord.zip.list({ limit: 10, nextToken: nextToken });\n\n```\n</details>\n\n\n#### `listAll(options)`\n\n- `options` ([`ListOptions`][list-options], optional)\n- returns `Promise<Array<ZipLog>>` - Promise with all zip logs for given account\n\n<details>\n  <summary>example</summary>\n\n```js\nconst zips = await akord.zip.listAll();\n```\n</details>\n\n#### `upload(vaultId, file, options)`\n- `vaultId` (`string`, required)\n- `file` ([`FileSource`][file-source], required) - file source: web File object, file path, buffer or stream\n- `options` (`ZipUploadOptions`, optional)\n- returns `Promise<{ sourceId }>` - Promise with corresponding source id, allowing to query corresponding files\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { sourceId } = await akord.zip.upload(vaultId, \"path to your file\");\n```\n</details>\n\n\n### storage\n\n#### `get()`\n- returns `Promise<Storage>` - Promise with user storage balance\n\n<details>\n  <summary>example</summary>\n\n```js\nconst storage = await akord.storage.get();\n```\n</details>\n\n#### `buy()`\nPay for storage. Increases Permanent Storage balance \n- returns `Promise<StorageBuyResponse>` - Promise with price `amount` & `currencyCode`. Contains `paymentId` for non sumulated payments.\n\n<details>\n  <summary>example</summary>\n\n```js\nconst gigabytesToBuy = 2;\nconst { amount, currencyCode } = await akord.storage.buy(gigabytesToBuy, { simulate: true }); // no actual payment, just check price\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3); // initiate payment for 3 GB's: no storage increase yet, no payment yet\n\nawait akord.storage.buy({ paymentId }); // confirm the payment: storage increase after successful payment\n```\n</details>\n\n<details>\n  <summary>example</summary>\n\n```js\nconst { paymentId, amount, currencyCode } = await akord.storage.buy(3, { currencyCode: 'EUR', confirm: true }); // auto-confirm payment for 3 GB's: storage increase after successful payment\n```\n</details>\n\n### Development\n```\nyarn install\nyarn build\n```\n\nTo run all tests:\n```\nyarn test\n```\n\nTo run single test file:\n```\nyarn test <path-to-test-file>\n\nyarn test ./src/__tests__/memo.test.ts\n```\n\nTo run single test file with direct log output:\n```\nnode --inspect node_modules/.bin/jest <path-to-test-file>\n\nnode --inspect node_modules/.bin/jest ./src/__tests__/folder.test.ts\n```\n\n\n[list-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L1\n[get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L9\n[vault-get-options]: https://github.com/Akord-com/akord-js/blob/193062c541ad06c186d5b872ecf9066d15806b43/src/types/query-options.ts#L14\n[file-source]: https://github.com/Akord-com/akord-js/blob/ccdfd3cd41b8e6fd38ce22cde96529273365e4f6/src/types/file.ts#L48\n[storage-type]: https://github.com/Akord-com/akord-js/blob/26d1945bee727a1af45f0f9cc44c7fa9b68c5d75/src/types/node.ts#L149\n[role-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/membership.ts#L4\n[node-type]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/node.ts#L11\n[batch-stack-create-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L1\n[batch-membership-invite-response]: https://github.com/Akord-com/akord-js/blob/03e28ffd95224dbfd0a8d891a06a154298619378/src/types/batch-response.ts#L7\n[file-upload-example]: https://github.com/Akord-com/recipes/blob/a2dbc847097973ef08586f32b0ce3192f0581ed4/nextjs-starter/src/pages/index.tsx#L66\n[manifest-options]: https://github.com/Akord-com/akord-js/blob/9ff0febe1362cd2888ff40aacc89ac1a0083db2e/src/core/manifest.ts#L17\n","readmeFilename":"README.md"}